:root {
    --orange-primary: #ff6b35;
    --orange-secondary: #ff8c42;
    --orange-light: #ffeee8;
    --orange-dark: #e55a2b;
    --orange-gradient: linear-gradient(135deg, #ff6b35 0%, #ff8c42 100%);

    --primary-color: #4361ee;
    --primary-dark: #3a0ca3;
    --secondary-color: #6f42c1;
    --success-color: #10b981;
    --info-color: #3b82f6;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --light-gray: #f8fafc;
    --border-color: #e5e7eb;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --border-radius: 12px;
    --border-radius-sm: 8px;
    --box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1),
        0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --box-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1),
        0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Orange Button Styles */
.btn-orange {
    background: var(--orange-gradient);
    border: none;
    color: white;
    transition: all 0.3s ease;
}

.btn-orange:hover {
    background: linear-gradient(135deg, #e55a2b 0%, #ff6b35 100%);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
}

.btn-outline-orange {
    border: 2px solid var(--orange-primary);
    color: var(--orange-primary);
    background: transparent;
    transition: all 0.3s ease;
}

.btn-outline-orange:hover {
    background: var(--orange-gradient);
    border-color: var(--orange-primary);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.2);
}

.btn-outline-orange:disabled {
    opacity: 0.5;
    transform: none;
    box-shadow: none;
}

.bg-orange {
    background: var(--orange-gradient) !important;
    color: white;
}

.text-orange {
    color: var(--orange-primary) !important;
}

.badge.bg-orange {
    background: var(--orange-gradient) !important;
    color: white;
    font-weight: 500;
    padding: 0.5em 0.8em;
}

/* User Dropdown Specific */
.user-dropdown .avatar {
    width: 36px;
    height: 36px;
    background-color: #e2e8f0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #4a5568;
}

.user-dropdown .avatar-lg {
    width: 60px;
    height: 60px;
    background-color: #e2e8f0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #4a5568;
    font-size: 1.5rem;
}

.user-dropdown .user-name {
    font-weight: 500;
    font-size: 0.9rem;
}

.user-dropdown .user-role {
    font-size: 0.75rem;
    color: #718096;
}

/* Logout Button */
.logout-btn {
    color: #e53e3e;
    background: none;
    border: none;
    width: 100%;
    text-align: left;
}

.logout-btn:hover {
    background-color: #fff5f5;
}

/* Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
*/

/* Academic Calendar Section - Enhanced Responsive Design */
.academic-calendar-section {
    padding: 100px 0 80px;
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
    position: relative;
    overflow: hidden;
}

.academic-calendar-section::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(
            circle at 20% 30%,
            rgba(255, 107, 53, 0.05) 0%,
            transparent 50%
        ),
        radial-gradient(
            circle at 80% 70%,
            rgba(255, 140, 66, 0.05) 0%,
            transparent 50%
        );
    pointer-events: none;
}

.calendar-section-wrapper {
    position: relative;
    z-index: 1;
}

/* Enhanced PDF Preview Container */
.pdf-preview-container {
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.08),
        0 8px 30px rgba(255, 107, 53, 0.06);
    overflow: hidden;
    margin-bottom: 30px;
    border: 1px solid rgba(255, 107, 53, 0.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateY(0);
}

.pdf-preview-container:hover {
    transform: translateY(-8px);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.12),
        0 12px 40px rgba(255, 107, 53, 0.1);
}

/* PDF Header with Better Responsive Design */
.pdf-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 30px 35px;
    background: linear-gradient(135deg, var(--orange-light) 0%, #ffffff 100%);
    border-bottom: 2px solid rgba(255, 107, 53, 0.1);
    flex-wrap: wrap;
    gap: 20px;
}

.pdf-info {
    flex: 1;
    min-width: 0;
}

.pdf-info h4 {
    color: #2c3e50;
    margin-bottom: 12px;
    font-weight: 700;
    font-size: clamp(1.1rem, 2.5vw, 1.5rem);
    line-height: 1.3;
    word-wrap: break-word;
}

.pdf-info .badge {
    font-size: clamp(0.75rem, 1.5vw, 0.9rem);
    padding: 8px 16px;
    border-radius: 25px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.pdf-controls {
    flex-shrink: 0;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* Enhanced PDF Viewer Container */
.pdf-viewer-container {
    position: relative;
    background: linear-gradient(135deg, #fafbfc 0%, #ffffff 100%);
}
/* Simplified PDF Toolbar */
.pdf-toolbar {
    background: white;
    border-bottom: 1px solid #e5e5e5;
    padding: 15px 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 12px 12px 0 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.pdf-navigation {
    display: flex;
    align-items: center;
    gap: 15px;
}

.page-info {
    font-weight: 600;
    color: #495057;
    font-size: 14px;
    white-space: nowrap;
}

/* Enhanced PDF Canvas Container - Simplified */
.pdf-canvas-container {
    position: relative;
    text-align: center;
    background: linear-gradient(135deg, #f5f6fa 0%, #ffffff 100%);
    padding: 20px 10px; /* Fixed padding instead of dynamic */
    overflow: hidden; /* Prevent overflow issues */
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px; /* Minimum height for loading state */
}

.pdf-canvas-wrapper {
    display: inline-block;
    position: relative;
    border-radius: 12px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15),
        0 6px 20px rgba(255, 107, 53, 0.1);
    overflow: hidden;
    background: white;
    border: 3px solid rgba(255, 107, 53, 0.1);
    max-width: 100%;
}

#pdfCanvas {
    display: block;
    background: white;
    max-width: 100%;
    height: auto;
    /* REMOVE: forced width/height styles that conflict with JS */
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}
/* Responsive Design */
@media (max-width: 767.98px) {
    .pdf-toolbar {
        padding: 10px 15px;
    }

    .pdf-navigation {
        gap: 10px;
    }

    .pdf-navigation .btn {
        padding: 6px 12px;
        font-size: 13px;
    }

    .page-info {
        font-size: 13px;
    }

    .pdf-canvas-wrapper {
        border-radius: 8px;
        border-width: 2px;
    }
}

@media (max-width: 575.98px) {
    .pdf-toolbar {
        padding: 8px 10px;
    }

    .pdf-navigation .btn {
        padding: 5px 10px;
        font-size: 12px;
    }

    .page-info {
        font-size: 12px;
    }
    .pdf-canvas-container {
        padding: 15px 5px;
        min-height: 150px;
    }

    .pdf-canvas-wrapper {
        border-radius: 8px;
        border-width: 2px;
        max-width: calc(100vw - 30px); /* Ensure it fits in viewport */
    }

    #pdfCanvas {
        border-radius: 6px;
    }
}

@media (max-width: 359px) {
    .pdf-canvas-container {
        padding: 10px 3px;
    }

    .pdf-canvas-wrapper {
        max-width: calc(100vw - 20px);
    }
}

/* Improved button styles */
.pdf-navigation .btn {
    transition: all 0.2s ease;
    border-width: 1.5px;
}

.pdf-navigation .btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
}

.pdf-navigation .btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Improved scrollbar for PDF container */
.pdf-canvas-container::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.pdf-canvas-container::-webkit-scrollbar-track {
    background: rgba(255, 107, 53, 0.1);
    border-radius: 4px;
}

.pdf-canvas-container::-webkit-scrollbar-thumb {
    background: var(--orange-gradient);
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.pdf-canvas-container::-webkit-scrollbar-thumb:hover {
    background: var(--orange-dark);
}

/* Focus improvements for accessibility */
.pdf-toolbar .btn:focus-visible {
    outline: 2px solid var(--orange-primary);
    outline-offset: 2px;
}

/* Enhanced loading state */
.pdf-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 10;
}

/* Print styles */
@media print {
    .pdf-header,
    .pdf-toolbar {
        display: none;
    }

    .pdf-canvas-container {
        padding: 0;
        min-height: auto;
    }

    .pdf-preview-container {
        box-shadow: none;
        border: none;
        margin: 0;
    }
}

/* High DPI display optimization */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .pdf-canvas-wrapper {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Modern Footer Design - Dynamic Orange & Blue Pattern */
.footer {
    position: relative;
    background: linear-gradient(
            135deg,
            rgba(255, 140, 0, 0.1) 0%,
            transparent 25%
        ),
        linear-gradient(45deg, rgba(67, 97, 238, 0.08) 25%, transparent 50%),
        linear-gradient(
            135deg,
            rgba(45, 70, 94, 0.9) 50%,
            rgba(30, 50, 75, 1) 100%
        );
    color: #fff;
    font-size: 14px;
    overflow: hidden;
    isolation: isolate;
}

.footer::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        /* Animated orange waves */ radial-gradient(
            circle at 25% 25%,
            rgba(255, 140, 0, 0.12) 0%,
            rgba(255, 140, 0, 0.04) 30%,
            transparent 60%
        ),
        /* Blue accent waves */
            radial-gradient(
                circle at 75% 40%,
                rgba(67, 97, 238, 0.1) 0%,
                rgba(67, 97, 238, 0.03) 40%,
                transparent 70%
            ),
        /* Secondary orange glow */
            radial-gradient(
                circle at 40% 80%,
                rgba(255, 107, 53, 0.1) 0%,
                rgba(255, 107, 53, 0.03) 35%,
                transparent 65%
            ),
        /* Deep blue accent */
            radial-gradient(
                circle at 80% 80%,
                rgba(45, 70, 94, 0.15) 0%,
                transparent 50%
            );
    pointer-events: none;
    z-index: 0;
}

.footer .container {
    position: relative;
    z-index: 1;
}

/* Modern Wave Separator */
.footer-top {
    position: relative;
    padding: 80px 0 50px;
}

.footer-top::before {
    content: "";
    position: absolute;
    top: -60px;
    left: 0;
    width: 100%;
    height: 60px;
    background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' preserveAspectRatio='none' viewBox='0 0 1440 90'><path fill='%23ffffff' d='M0,64L80,69.3C160,75,320,85,480,74.7C640,64,800,32,960,26.7C1120,21,1280,43,1360,53.3L1440,64L1440,0L1360,0C1280,0,1120,0,960,0C800,0,640,0,480,0C320,0,160,0,80,0L0,0Z'></path></svg>")
        center / cover no-repeat;
    transform: translateY(-1px);
}

/* Enhanced Brand Section */
.footer-brand .logo {
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
}

.footer-brand .logo:hover {
    transform: translateY(-2px);
    filter: brightness(1.1);
}

.footer-brand .logo-img {
    height: 50px;
    width: auto;
    margin-right: 12px;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
    transition: all 0.3s ease;
}

.footer-brand .sitename {
    font-family: var(--heading-font, "Poppins", sans-serif);
    font-size: 28px;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.footer-description {
    font-size: 15px;
    line-height: 1.6;
    margin: 18px 0 25px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.85);
    max-width: 400px;
}

/* Modern Contact Section */
.footer-contact .contact-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 15px;
    padding: 8px 0;
    transition: all 0.3s ease;
    position: relative;
    border-radius: 8px;
}

.footer-contact .contact-item:hover {
    transform: translateX(4px);
    background: rgba(255, 140, 0, 0.1);
    padding-left: 8px;
}

.footer-contact .contact-item i {
    font-size: 16px;
    margin-top: 2px;
    color: var(--orange-primary);
    width: 24px;
    text-align: center;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.footer-contact .contact-item:hover i {
    color: #fff;
    transform: scale(1.1);
}

.footer-contact .contact-item strong {
    font-weight: 600;
    margin-right: 4px;
    color: #fff;
}

.footer-contact .contact-link {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    transition: all 0.3s ease;
}

.footer-contact .contact-link:hover {
    color: #fff;
    text-decoration: underline;
}

/* Enhanced Social Links */
.social-links .social-title {
    font-size: 16px;
    font-weight: 600;
    margin: 10px 0 16px;
    color: #fff;
    letter-spacing: 0.5px;
}

.social-icons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.social-link {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 18px;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 140, 0, 0.2);
    position: relative;
    overflow: hidden;
}

.social-link::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.15),
        transparent 50%
    );
    opacity: 0;
    transition: opacity 0.3s ease;
}

.social-link:hover::before {
    opacity: 1;
}

.social-link:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.social-link.youtube:hover {
    background: #c81111;
    border-color: #c81111;
}

.social-link.facebook:hover {
    background: #4267b2;
    border-color: #4267b2;
}

.social-link.instagram:hover {
    background: linear-gradient(
        45deg,
        #f09433,
        #e6683c,
        #dc2743,
        #cc2366,
        #bc1888
    );
    border-color: #f09433;
}

.social-link.linkedin:hover {
    background: #0077b5;
    border-color: #0077b5;
}

/* Modern Footer Links */
.footer-links h4 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 20px;
    color: #fff;
    display: flex;
    align-items: center;
    position: relative;
    letter-spacing: 0.5px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.footer-links h4 i {
    color: var(--orange-primary);
    margin-right: 8px;
    text-shadow: none;
}

.footer-links h4::after {
    content: "";
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 40px;
    height: 3px;
    background: linear-gradient(
        90deg,
        var(--orange-primary) 0%,
        rgba(255, 140, 0, 0.4) 100%
    );
    border-radius: 2px;
}

.footer-links ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links ul li {
    margin-bottom: 8px;
}

.footer-links ul a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    display: flex;
    align-items: center;
    font-weight: 400;
    transition: all 0.3s ease;
    padding: 6px 0;
    border-radius: 6px;
    position: relative;
}

.footer-links ul a i {
    font-size: 12px;
    margin-right: 8px;
    transition: all 0.3s ease;
    color: var(--orange-primary);
}

.footer-links ul a:hover {
    color: #fff;
    transform: translateX(4px);
    background: rgba(255, 140, 0, 0.1);
    padding-left: 8px;
}

.footer-links ul a:hover i {
    transform: translateX(3px);
    color: #fff;
}

/* Modern Footer Bottom */
.footer-bottom {
    background: rgba(0, 0, 0, 0.3);
    padding: 25px 0;
    border-top: 1px solid rgba(255, 140, 0, 0.2);
    backdrop-filter: blur(10px);
    position: relative;
    z-index: 1;
}

.footer-bottom::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        90deg,
        rgba(255, 140, 0, 0.05),
        rgba(255, 140, 0, 0) 40%,
        rgba(255, 140, 0, 0) 60%,
        rgba(255, 140, 0, 0.05)
    );
    opacity: 0.5;
    pointer-events: none;
}

.copyright-text,
.footer-bottom p {
    margin: 0;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.85);
}

.sitename {
    font-weight: 600;
    color: #fff;
}

.footer-credits {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    justify-content: flex-end;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.85);
}

.footer-credits i {
    font-size: 14px;
}

/* Enhanced Developer Links */
.developer-link,
.institution-link {
    color: var(--orange-primary);
    text-decoration: none;
    position: relative;
    font-weight: 500;
    transition: all 0.3s ease;
}

.developer-link:hover,
.institution-link:hover {
    color: #fff;
    text-decoration: underline;
}

/* Modern Back to Top */
.back-to-top {
    position: fixed;
    right: 20px;
    bottom: 20px;
    width: 50px;
    height: 50px;
    background: linear-gradient(
        135deg,
        var(--orange-primary) 0%,
        var(--orange-secondary) 100%
    );
    color: #fff;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 1000;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 20px rgba(255, 140, 0, 0.3);
}

.back-to-top.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(255, 140, 0, 0.4);
    background: linear-gradient(
        135deg,
        var(--orange-secondary) 0%,
        var(--orange-primary) 100%
    );
}

/* Performance Optimizations */
.footer * {
    contain: layout;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .footer-brand .sitename {
        font-size: 26px;
    }
}

@media (max-width: 992px) {
    .footer-top {
        padding: 70px 0 45px;
    }

    .footer-top::before {
        height: 50px;
        top: -50px;
    }

    .footer-credits {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .footer-top {
        padding: 60px 0 40px;
    }

    .footer-brand .sitename {
        font-size: 24px;
    }

    .social-icons {
        justify-content: flex-start;
    }

    .footer-credits {
        text-align: center;
        flex-direction: column;
        gap: 4px;
    }

    .footer-links h4 {
        font-size: 16px;
    }
}

@media (max-width: 576px) {
    .footer-top {
        padding: 50px 1.2rem 35px;
    }

    .footer-top::before {
        height: 40px;
        top: -40px;
    }

    .footer-brand .sitename {
        font-size: 22px;
    }

    .footer-description {
        font-size: 14px;
    }

    .footer-credits {
        font-size: 12px;
    }

    .social-link {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
}

/* Accessibility Improvements */
.footer-links ul a:focus-visible,
.social-link:focus-visible,
.footer-contact .contact-link:focus-visible,
.developer-link:focus-visible,
.institution-link:focus-visible {
    outline: 2px solid var(--orange-primary);
    outline-offset: 2px;
}

/* Performance: Disable animations on reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    .footer *,
    .social-link,
    .footer-links ul a,
    .contact-item {
        transition: none;
        animation: none;
    }
}

/* User Dropdown Button */
.user-dropdown-wrapper {
    position: relative;
    max-width: 250px; /* Batasi lebar maksimum */
}

.user-dropdown-btn {
    padding: 8px 12px;
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 140, 0, 0.2);
    transition: all 0.3s ease;
    color: var(--nav-color);
    max-width: 100%;
    min-width: fit-content;
}

.user-dropdown-btn:hover {
    background: var(--orange-light);
    border-color: var(--orange-primary);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 140, 0, 0.2);
    color: var(--orange-primary);
}

.user-avatar {
    position: relative;
    flex-shrink: 0; /* Prevent avatar from shrinking */
}

.avatar-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--orange-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(255, 255, 255, 0.8);
    transition: all 0.3s ease;
}

.avatar-text {
    color: white;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
}

.status-indicator {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 12px;
    height: 12px;
    background: #10b981;
    border: 2px solid white;
    border-radius: 50%;
    animation: pulse-green 2s infinite;
}

@keyframes pulse-green {
    0% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4);
    }
    70% {
        box-shadow: 0 0 0 6px rgba(16, 185, 129, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}

.user-name {
    font-weight: 600;
    font-size: 14px;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 120px; /* Batasi lebar nama */
    cursor: help; /* Show cursor hint for tooltip */
}

.user-role {
    color: var(--orange-primary);
    font-size: 11px;
    font-weight: 500;
    opacity: 0.8;
    white-space: nowrap;
}

/* Enhanced Dropdown Menu */
.user-dropdown-menu {
    min-width: 320px;
    max-width: 350px;
    border: none;
    border-radius: 16px;
    padding: 0;
    background: white;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1),
        0 8px 25px rgba(255, 140, 0, 0.1);
    animation: dropdownFadeIn 0.3s ease-out;
    overflow: hidden;
    margin-top: 8px;
}

@keyframes dropdownFadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Profile Header */
.user-profile-header {
    position: relative;
    padding: 0;
    border: none;
    background: transparent;
    overflow: hidden;
}

.profile-header-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    background: var(--orange-gradient);
    z-index: 1;
}

.profile-header-bg::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="white" opacity="0.1"/><circle cx="75" cy="75" r="1" fill="white" opacity="0.1"/><circle cx="50" cy="10" r="0.5" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    z-index: 2;
}

.profile-content {
    position: relative;
    z-index: 3;
    padding: 25px 20px;
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.profile-avatar {
    position: relative;
    flex-shrink: 0;
}

.avatar-large {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
}

.avatar-text-large {
    color: white;
    font-weight: 700;
    font-size: 16px;
    text-transform: uppercase;
}

.profile-status {
    position: absolute;
    bottom: -2px;
    right: -2px;
    background: white;
    border-radius: 50%;
    padding: 2px;
}

.profile-status i {
    color: #10b981;
    font-size: 12px;
}

.profile-info {
    flex: 1;
    min-width: 0; /* Allow text to wrap/truncate */
    overflow: hidden;
}

.profile-name {
    color: white;
    font-weight: 700;
    font-size: 16px;
    margin-bottom: 4px;
    line-height: 1.3;
    /* Allow text to wrap to multiple lines */
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    cursor: help; /* Show cursor hint for tooltip */
}

.profile-nim {
    color: rgba(255, 255, 255, 0.9);
    font-size: 12px;
    margin-bottom: 2px;
    font-weight: 500;
}

.profile-email {
    color: rgba(255, 255, 255, 0.8);
    font-size: 11px;
    margin-bottom: 8px;
    word-break: break-word;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    cursor: help; /* Show cursor hint for tooltip */
}

.profile-badge {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    display: inline-block;
}

/* Responsive Design untuk Nama Panjang */
@media (max-width: 1199.98px) {
    .user-dropdown-wrapper {
        max-width: 200px;
    }

    .user-name {
        max-width: 100px;
        font-size: 13px;
    }
}


@media (max-width: 767.98px) {
    .user-dropdown-wrapper {
        max-width: 160px;
    }

    .user-dropdown-menu {
        min-width: 260px;
        margin-top: 5px;
    }

    .profile-content {
        padding: 18px 12px;
    }

    .profile-name {
        font-size: 14px;
    }

    .profile-email {
        font-size: 10px;
    }
}



/* Tooltip Enhancement */
.user-name[title]:hover::after,
.profile-name[title]:hover::after,
.profile-email[title]:hover::after {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 1000;
    margin-bottom: 5px;
    pointer-events: none;
}

.user-name[title]:hover::before,
.profile-name[title]:hover::before,
.profile-email[title]:hover::before {
    content: "";
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 4px solid transparent;
    border-top-color: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    margin-bottom: 1px;
    pointer-events: none;
}

/* Dropdown Sections */
.dropdown-section {
    padding: 15px 20px;
}

.dropdown-section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 700;
    color: var(--orange-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.dropdown-section-title i {
    font-size: 14px;
}

/* ===============================================
   COMPACT SERVICES SECTION IN DROPDOWN
   =============================================== */

.dropdown-section.services-section {
    padding: 15px 18px;
    background: linear-gradient(135deg, #fafbfc 0%, #f8f9fa 100%);
}

.dropdown-section-title {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 700;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
}

.dropdown-section-title i {
    font-size: 13px;
    color: #ff6b2c;
}

/* Compact Services Grid Layout - 2x3 Grid */
.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 0;
}

/* Compact Service Card Mini */
.service-card-mini {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10px 6px;
    background: white;
    border-radius: 10px;
    text-decoration: none;
    color: #374151;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
    min-height: 75px;
}

.service-card-mini::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #ff6b2c 0%, #ff8c52 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 0;
}

.service-card-mini:hover::before {
    opacity: 1;
}

.service-card-mini:hover {
    border-color: #ff6b2c;
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 6px 16px rgba(255, 107, 44, 0.25);
}

/* Compact Service Icon Mini */
.service-icon-mini {
    position: relative;
    z-index: 1;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(255, 107, 44, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 6px;
    transition: all 0.3s ease;
}

.service-icon-mini i {
    font-size: 16px;
    color: #ff6b2c;
    transition: all 0.3s ease;
}

.service-card-mini:hover .service-icon-mini {
    background: rgba(255, 255, 255, 0.95);
    transform: scale(1.1) rotate(5deg);
}

.service-card-mini:hover .service-icon-mini i {
    color: #ff6b2c;
}

/* Compact Service Name Mini */
.service-name-mini {
    position: relative;
    z-index: 1;
    font-size: 10px;
    font-weight: 600;
    text-align: center;
    line-height: 1.2;
    color: #374151;
    transition: color 0.3s ease;
    display: -webkit-box;
    --webkit-line-clamp: 2;
    --webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    word-break: break-word;
}

.service-card-mini:hover .service-name-mini {
    color: white;
}

/* View All Services Button - Compact */
.view-all-services {
    text-align: center;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 107, 44, 0.15);
}

.btn-view-all {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 7px 16px;
    background: linear-gradient(135deg, #ff6b2c 0%, #ff8c52 100%);
    color: white;
    text-decoration: none;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(255, 107, 44, 0.2);
}

.btn-view-all:hover {
    background: linear-gradient(135deg, #ff8c52 0%, #ff6b2c 100%);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 5px 14px rgba(255, 107, 44, 0.3);
}

.btn-view-all i {
    font-size: 10px;
    transition: transform 0.3s ease;
}

.btn-view-all:hover i {
    transform: translateX(2px);
}

/* Empty State - Compact */
.services-grid .text-center {
    grid-column: 1 / -1;
    padding: 15px 10px;
}

.services-grid .text-center i {
    font-size: 28px;
    color: #9ca3af;
    margin-bottom: 6px;
}

.services-grid .text-center p {
    font-size: 11px;
}

/* ===============================================
   COMPACT QUICK ACTIONS SECTION
   =============================================== */

.dropdown-section {
    padding: 12px 18px;
}

.quick-actions {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.quick-action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 12px 8px;
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    text-decoration: none;
    color: #374151;
    transition: all 0.3s ease;
    font-size: 11px;
    font-weight: 600;
}

.quick-action-btn:hover {
    border-color: #ff6b2c;
    background: rgba(255, 107, 44, 0.05);
    color: #ff6b2c;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 107, 44, 0.15);
}

.action-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.action-icon.tracking {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
}

.action-icon.services {
    background: rgba(255, 107, 44, 0.1);
    color: #ff6b2c;
}

.quick-action-btn:hover .action-icon.tracking {
    background: #3b82f6;
    color: white;
    transform: scale(1.05);
}

.quick-action-btn:hover .action-icon.services {
    background: #ff6b2c;
    color: white;
    transform: scale(1.05);
}

.action-icon i {
    font-size: 16px;
}

/* ===============================================
   COMPACT LOGOUT SECTION
   =============================================== */

.dropdown-footer {
    padding: 10px 15px;
    background: #f9fafb;
    border-top: 1px solid #e5e7eb;
}

.logout-btn {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: white;
    border: 2px solid #fee2e2;
    border-radius: 10px;
    color: #dc2626;
    font-weight: 600;
    font-size: 12px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.logout-btn:hover {
    background: #dc2626;
    border-color: #dc2626;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.2);
}

.logout-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: #fee2e2;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.logout-btn:hover .logout-icon {
    background: rgba(255, 255, 255, 0.2);
}

.logout-icon i {
    font-size: 14px;
}

.logout-arrow {
    margin-left: auto;
    transition: transform 0.3s ease;
}

.logout-btn:hover .logout-arrow {
    transform: translateX(3px);
}

.logout-arrow i {
    font-size: 12px;
}

/* ===============================================
   COMPACT DROPDOWN MENU SIZE
   =============================================== */

.user-dropdown-menu {
    min-width: 340px;
    max-width: 380px;
    max-height: 80vh;
    overflow-y: auto;
    overflow-x: hidden;
    border-radius: 16px;
}

/* Slim Scrollbar */
.user-dropdown-menu::-webkit-scrollbar {
    width: 5px;
}

.user-dropdown-menu::-webkit-scrollbar-track {
    background: rgba(255, 107, 44, 0.05);
    border-radius: 10px;
}

.user-dropdown-menu::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #ff6b2c 0%, #ff8c52 100%);
    border-radius: 10px;
}

.user-dropdown-menu::-webkit-scrollbar-thumb:hover {
    background: #ff6b2c;
}

/* Compact Divider */
.user-dropdown-menu .dropdown-divider {
    margin: 0;
    opacity: 0.7;
}

/* ===============================================
   COMPACT PROFILE HEADER
   =============================================== */

.user-profile-header {
    position: relative;
    padding: 0;
    margin-bottom: 0;
}

.profile-content {
    position: relative;
    z-index: 3;
    padding: 20px 18px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.avatar-large {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid rgba(255, 255, 255, 0.3);
}

.avatar-text-large {
    color: white;
    font-weight: 700;
    font-size: 15px;
    text-transform: uppercase;
}

.profile-name {
    color: white;
    font-weight: 700;
    font-size: 15px;
    margin-bottom: 3px;
    line-height: 1.3;
}

.profile-nim {
    color: rgba(255, 255, 255, 0.9);
    font-size: 11px;
    margin-bottom: 2px;
    font-weight: 500;
}

.profile-email {
    color: rgba(255, 255, 255, 0.8);
    font-size: 10px;
    margin-bottom: 6px;
}

.profile-badge {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 9px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    display: inline-block;
}

/* ===============================================
   RESPONSIVE DESIGN - COMPACT VERSION
   =============================================== */

@media (max-width: 1199.98px) {
    .user-dropdown-menu {
        min-width: 320px;
        max-width: 360px;
    }

    .services-grid {
        gap: 6px;
    }

    .service-card-mini {
        padding: 8px 5px;
        min-height: 70px;
    }

    .service-icon-mini {
        width: 32px;
        height: 32px;
    }

    .service-icon-mini i {
        font-size: 14px;
    }

    .service-name-mini {
        font-size: 9px;
    }
}


@media (max-width: 767.98px) {
    .user-dropdown-menu {
        min-width: 280px;
        max-width: calc(100vw - 30px);
        left: 50% !important;
        right: auto !important;
        transform: translateX(-50%);
    }

    .services-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 6px;
    }

    .service-card-mini {
        padding: 8px 4px;
        min-height: 65px;
    }

    .service-icon-mini {
        width: 30px;
        height: 30px;
        margin-bottom: 5px;
    }

    .service-icon-mini i {
        font-size: 13px;
    }

    .service-name-mini {
        font-size: 9px;
    }

    .btn-view-all {
        padding: 6px 14px;
        font-size: 10px;
    }

    .dropdown-section {
        padding: 10px 15px;
    }

    .dropdown-section-title {
        font-size: 10px;
        margin-bottom: 8px;
    }

    .profile-content {
        padding: 18px 15px;
    }
}

@media (max-width: 575.98px) {
    .user-dropdown-menu {
        min-width: 260px;
        max-width: calc(100vw - 20px);
    }

    .services-grid {
        gap: 5px;
    }

    .service-card-mini {
        padding: 7px 3px;
        min-height: 62px;
    }

    .service-icon-mini {
        width: 28px;
        height: 28px;
    }

    .service-icon-mini i {
        font-size: 12px;
    }

    .service-name-mini {
        font-size: 8.5px;
    }

    .dropdown-section.services-section {
        padding: 10px 12px;
    }

    .quick-action-btn {
        padding: 9px 5px;
        font-size: 9.5px;
    }

    .action-icon {
        width: 30px;
        height: 30px;
    }

    .action-icon i {
        font-size: 13px;
    }

    .logout-btn {
        padding: 9px 10px;
        font-size: 11px;
    }

    .logout-icon {
        width: 28px;
        height: 28px;
    }
}

/* ===============================================
   LOADING STATE
   =============================================== */

.services-grid.loading {
    position: relative;
    min-height: 80px;
}

.services-grid.loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 25px;
    height: 25px;
    border: 2px solid rgba(255, 107, 44, 0.2);
    border-top-color: #ff6b2c;
    border-radius: 50%;
    animation: spin-loader 0.8s linear infinite;
}

@keyframes spin-loader {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* ===============================================
   ACCESSIBILITY
   =============================================== */

.service-card-mini:focus-visible,
.quick-action-btn:focus-visible,
.btn-view-all:focus-visible,
.logout-btn:focus-visible {
    outline: 2px solid rgba(255, 107, 44, 0.5);
    outline-offset: 2px;
}

/* ===============================================
   REDUCED MOTION
   =============================================== */

@media (prefers-reduced-motion: reduce) {
    .service-card-mini,
    .service-icon-mini,
    .service-icon-mini i,
    .quick-action-btn,
    .action-icon,
    .btn-view-all,
    .btn-view-all i,
    .logout-btn,
    .logout-arrow {
        transition: none;
        animation: none;
    }
}

/* Quick Actions */
.quick-actions {
    display: flex;
    gap: 10px;
}

.quick-action-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px 8px;
    background: var(--orange-light);
    border-radius: 12px;
    text-decoration: none;
    color: var(--orange-primary);
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 140, 0, 0.2);
}

.quick-action-btn:hover {
    background: var(--orange-gradient);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 140, 0, 0.3);
}

.action-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 6px;
    transition: all 0.3s ease;
}

.action-icon.tracking {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
}

.action-icon.services {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.quick-action-btn:hover .action-icon {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.quick-action-btn span {
    font-size: 11px;
    font-weight: 600;
    text-align: center;
}

/* Custom Dropdown Items */
.dropdown-item-custom {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    text-decoration: none;
    color: var(--default-color);
    transition: all 0.3s ease;
    border-radius: 0;
}

.dropdown-item-custom:hover {
    background: var(--orange-light);
    color: var(--orange-primary);
}

.item-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: rgba(255, 140, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--orange-primary);
    transition: all 0.3s ease;
}

.dropdown-item-custom:hover .item-icon {
    background: var(--orange-primary);
    color: white;
}

.item-content {
    flex: 1;
}

.item-title {
    display: block;
    font-weight: 600;
    font-size: 14px;
    line-height: 1.2;
}

.item-subtitle {
    color: #6b7280;
    font-size: 11px;
    line-height: 1.2;
}

/* Divider */
.dropdown-divider {
    margin: 0;
    border-top: 1px solid rgba(255, 140, 0, 0.1);
}

/* Logout Section */
.dropdown-footer {
    padding: 15px 20px;
    background: rgba(255, 140, 0, 0.05);
}

.logout-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: white;
    border: 2px solid var(--orange-primary);
    border-radius: 12px;
    color: var(--orange-primary);
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    text-decoration: none;
}

.logout-btn:hover {
    background: var(--orange-gradient);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 140, 0, 0.3);
}

.logout-icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logout-arrow {
    opacity: 0;
    transform: translateX(-5px);
    transition: all 0.3s ease;
}

.logout-btn:hover .logout-arrow {
    opacity: 1;
    transform: translateX(0);
}


@media (max-width: 767.98px) {
    .user-dropdown-menu {
        min-width: 260px;
        margin-top: 5px;
    }

    .quick-actions {
        flex-direction: column;
        gap: 8px;
    }

    .quick-action-btn {
        flex-direction: row;
        justify-content: flex-start;
        gap: 12px;
        padding: 10px 12px;
    }

    .action-icon {
        margin-bottom: 0;
    }
}

/* Animation Enhancement */
.user-dropdown-menu.show {
    animation: dropdownSlideIn 0.3s ease-out;
}

@keyframes dropdownSlideIn {
    0% {
        opacity: 0;
        transform: translateY(-15px) scale(0.9);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ===============================================
   SIMPLE MOBILE DROPDOWN FIX - TAMBAHKAN DI AKHIR FILE
   =============================================== */

/* Mobile Dropdown Position Fix */
@media (max-width: 767.98px) {
    /* Fix dropdown position untuk mobile */
    .user-dropdown-menu {
        position: fixed !important;
        top: 70px !important; /* Sesuaikan dengan tinggi header Anda */
        right: 10px !important;
        left: auto !important;
        transform: none !important;
        margin: 0 !important;
    }


    /* Prevent body scroll saat dropdown open */
    body.dropdown-open {
        overflow: hidden;
    }
}



/* ===============================================
   CARD COMPONENTS
   =============================================== */
.surat-card {
    border-radius: var(--border-radius);
    border: none;
    box-shadow: var(--box-shadow);
    background: #ffffff;
    overflow: hidden;
    transition: var(--transition);
}

.surat-card:hover {
    box-shadow: var(--box-shadow-lg);
    transform: translateY(-2px);
}

.surat-card-header {
    border-bottom: 1px solid var(--border-color);
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    padding: 1.5rem;
    position: relative;
}

.surat-card-header::before {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(
        90deg,
        var(--primary-color),
        var(--secondary-color)
    );
}

.surat-card-body {
    padding: 1.5rem;
}

.surat-card-title {
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.surat-card-title i {
    color: var(--primary-color);
}

/* ===============================================
   BUTTON COMPONENTS
   =============================================== */
.btn-surat-primary {
    background: linear-gradient(
        135deg,
        var(--primary-color),
        var(--primary-dark)
    );
    border: none;
    border-radius: 50px;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    font-size: 0.875rem;
    color: white;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(67, 97, 238, 0.3);
    position: relative;
    overflow: hidden;
}

.btn-surat-primary::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.2),
        transparent
    );
    transition: left 0.5s;
}

.btn-surat-primary:hover::before {
    left: 100%;
}

.btn-surat-primary:hover {
    background: linear-gradient(
        135deg,
        var(--primary-dark),
        var(--primary-color)
    );
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(67, 97, 238, 0.4);
    color: white;
    text-decoration: none;
}

/* ===============================================
   FILTER SECTION
   =============================================== */
.surat-filter-section {
    background: linear-gradient(135deg, var(--light-gray) 0%, #f1f5f9 100%);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-bottom: 2rem;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.surat-search-box {
    position: relative;
    max-width: 350px;
}

.surat-search-box .form-control {
    padding-left: 3rem;
    padding-right: 1rem;
    border-radius: var(--border-radius-sm);
    border: 2px solid var(--border-color);
    height: 48px;
    font-size: 0.875rem;
    transition: var(--transition);
    background: #ffffff;
}

.surat-search-box .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.1);
}

.surat-search-box .search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    font-size: 1.125rem;
    transition: var(--transition);
}

.surat-search-box .form-control:focus ~ .search-icon {
    color: var(--primary-color);
}

/* ===============================================
   TABLE COMPONENTS
   =============================================== */
.surat-table-container {
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    background: #ffffff;
}

.surat-table {
    margin-bottom: 0;
    font-size: 0.875rem;
}

.surat-table th {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.75rem;
    color: var(--text-primary);
    border: none;
    padding: 1rem;
    position: relative;
}

.surat-table th::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(
        90deg,
        var(--primary-color),
        var(--secondary-color)
    );
}

.surat-table td {
    padding: 1.25rem 1rem;
    vertical-align: middle;
    border-bottom: 1px solid #f1f5f9;
    color: var(--text-primary);
    transition: var(--transition);
}

.surat-table tbody tr {
    transition: var(--transition);
}

.surat-table tbody tr:hover {
    background: linear-gradient(
        135deg,
        rgba(67, 97, 238, 0.02) 0%,
        rgba(111, 66, 193, 0.02) 100%
    );
}

/* ===============================================
   ACTION BUTTONS
   =============================================== */
.surat-action-buttons {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: wrap;
}

.surat-action-btn {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--border-radius-sm);
    transition: var(--transition);
    text-decoration: none;
    border: none;
    font-size: 1rem;
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.surat-action-btn::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.2),
        transparent
    );
    transition: left 0.5s;
}

.surat-action-btn:hover::before {
    left: 100%;
}

.surat-action-btn:hover {
    transform: translateY(-2px);
    text-decoration: none;
}

/* Detail Button */
.surat-action-btn--detail {
    background: linear-gradient(135deg, var(--info-color), #1e40af);
    color: white;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.surat-action-btn--detail:hover {
    background: linear-gradient(135deg, #1e40af, #1e3a8a);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
    color: white;
}

/* Download Button */
.surat-action-btn--download {
    background: linear-gradient(135deg, var(--success-color), #059669);
    color: white;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.surat-action-btn--download:hover {
    background: linear-gradient(135deg, #059669, #047857);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
    color: white;
}

/* ===============================================
   TRACKING CODE COMPONENT
   =============================================== */
.surat-tracking-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    padding: 0.5rem 0.75rem;
    border-radius: var(--border-radius-sm);
    border: 1px solid var(--border-color);
}

.surat-tracking-code {
    font-family: "Monaco", "Menlo", "Ubuntu Mono", monospace;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--primary-color);
    letter-spacing: 0.5px;
}

.surat-copy-btn {
    width: 32px;
    height: 32px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--border-radius-sm);
    background: rgba(67, 97, 238, 0.1);
    border: 1px solid rgba(67, 97, 238, 0.2);
    color: var(--primary-color);
    transition: var(--transition);
    cursor: pointer;
}

.surat-copy-btn:hover {
    background: rgba(67, 97, 238, 0.2);
    transform: scale(1.1);
    border-color: var(--primary-color);
}

.surat-copy-btn i {
    font-size: 0.875rem;
}

/* ===============================================
   EMPTY STATE
   =============================================== */
.surat-empty-state {
    text-align: center;
    padding: 4rem 2rem;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: var(--border-radius);
    margin: 2rem 0;
}

.surat-empty-state .empty-icon {
    font-size: 4rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    opacity: 0.7;
}

.surat-empty-state h5 {
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.surat-empty-state p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

/* ===============================================
   STATUS BADGES
   =============================================== */
.surat-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.375rem 0.75rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.surat-status-badge--pending {
    background: rgba(245, 158, 11, 0.1);
    color: #d97706;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.surat-status-badge--approved {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.surat-status-badge--rejected {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

/* ===============================================
   RESPONSIVE DESIGN
   =============================================== */
@media (max-width: 768px) {
    .surat-card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .surat-search-box {
        max-width: 100%;
        margin-bottom: 1rem;
    }

    .surat-action-buttons {
        flex-direction: column;
        gap: 0.25rem;
        align-items: stretch;
        width: 100%;
    }

    .surat-action-btn {
        width: 100%;
        height: 36px;
        border-radius: var(--border-radius-sm);
        font-size: 0.75rem;
        justify-content: flex-start;
        padding: 0 1rem;
    }

    .surat-action-btn i {
        margin-right: 0.5rem;
    }

    .surat-action-btn::after {
        content: attr(data-title);
        font-size: 0.75rem;
    }

    .surat-tracking-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
        padding: 0.75rem;
    }
}

/* ===============================================
   PAGINATION STYLING
   =============================================== */
.surat-pagination .pagination {
    gap: 0.25rem;
}

.surat-pagination .page-item {
    margin: 0;
}

.surat-pagination .page-link {
    color: var(--primary-color);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    padding: 0.5rem 0.75rem;
    font-weight: 500;
    transition: var(--transition);
}

.surat-pagination .page-item.active .page-link {
    background: linear-gradient(
        135deg,
        var(--primary-color),
        var(--primary-dark)
    );
    border-color: var(--primary-color);
    color: white;
    box-shadow: 0 4px 15px rgba(67, 97, 238, 0.3);
}

.surat-pagination .page-link:hover {
    background: rgba(67, 97, 238, 0.05);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* ===============================================
   LOADING STATES
   =============================================== */
.surat-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
}

.surat-loading .spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--border-color);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* ===============================================
   UTILITIES
   =============================================== */
.text-surat-primary {
    color: var(--primary-color) !important;
}
.text-surat-secondary {
    color: var(--text-secondary) !important;
}
.bg-surat-light {
    background-color: var(--light-gray) !important;
}

.surat-shadow {
    box-shadow: var(--box-shadow);
}
.surat-shadow-lg {
    box-shadow: var(--box-shadow-lg);
}

.surat-transition {
    transition: var(--transition);
}
