* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
}

:root {
    --primary-color: #2563eb;
    --secondary-color: #1d4ed8;
    --primary-light: #3b82f6;
    --primary-dark: #1e40af;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --info-color: #3b82f6;
    --dark-color: #1f2937;
    --light-color: #f9fafb;
    --border-color: #e5e7eb;
    --text-color: #374151;
    --sidebar-width: 280px;
    --sidebar-collapsed-width: 80px;
    --header-height: 70px;
}

body {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--light-color);
    color: var(--text-color);
    line-height: 1.6;
}

/* ================================================
   SIDEBAR STYLES
   ================================================ */

.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: white;
    color: var(--dark-color);
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 1001;
    box-shadow: 4px 0 10px rgba(0, 0, 0, 0.15);
    /* Hidden by default - slide from left */
    transform: translateX(-100%);
    visibility: hidden;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.3s;
}

/* Sidebar visible state */
.sidebar.active {
    transform: translateX(0);
    visibility: visible;
}

/* Prevent transition on page load */
.sidebar.no-transition {
    transition: none !important;
}

/* Sidebar Header */
.sidebar-header {
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-color);
    height: var(--header-height);
    background: white;
    box-sizing: border-box;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--dark-color);
}

.logo img {
    min-width: 40px;
    flex-shrink: 0;
}

.logo i {
    font-size: 2rem;
    min-width: 2rem;
    color: var(--primary-color);
}

.logo-text {
    white-space: nowrap;
    color: var(--dark-color);
}

/* Sidebar Toggle Button - hamburger style */
.sidebar-toggle {
    display: flex;
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.sidebar-toggle:hover {
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary-color);
}

.sidebar-toggle:active {
    background: rgba(37, 99, 235, 0.22) !important;
    transform: scale(0.92) !important;
    transition: all 0.1s ease !important;
}

/* Sidebar User */
.sidebar-user {
    padding: 15px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    transition: all 0.3s ease;
    background: white;
}

.user-avatar {
    font-size: 3rem;
    opacity: 0.9;
    min-width: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
}

.user-avatar i {
    font-size: 3rem;
    color: var(--primary-color);
}

.user-info {
    transition: all 0.3s ease;
    overflow: hidden;
}

.user-info h4 {
    font-size: 1.1rem;
    margin-bottom: 5px;
    white-space: nowrap;
    color: var(--dark-color);
}

.user-info p {
    font-size: 0.85rem;
    opacity: 0.7;
    white-space: nowrap;
    color: var(--text-color);
}

/* Sidebar Menu */
.sidebar-menu {
    padding: 30px 0 20px 0;
    overflow-y: hidden;
    max-height: calc(100vh - 200px);
}

/* Hide scrollbar when collapsed */
.sidebar.collapsed .sidebar-menu {
    overflow-y: hidden;
}

.sidebar-menu ul {
    list-style: none;
}

.sidebar-menu li {
    margin: 5px 15px;
}

.sidebar-menu li a {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 15px;
    color: var(--dark-color);
    text-decoration: none;
    border-radius: 10px;
    transition: background 0.3s ease, transform 0.3s ease;
    font-size: 0.95rem;
    position: relative;
    white-space: nowrap;
}

.sidebar:not(.transition-enabled) .sidebar-menu li a {
    transition: none !important;
}

.sidebar-menu li a i {
    font-size: 1.2rem;
    width: 25px;
    min-width: 25px;
    max-width: 25px;
    text-align: center;
    color: var(--primary-color);
    flex-shrink: 0;
    transition: none;
}

.sidebar-menu li a span {
    transition: opacity 0.3s ease, visibility 0.3s ease;
    flex: 1;
    overflow: hidden;
}

.sidebar:not(.transition-enabled) .sidebar-menu li a span {
    transition: none !important;
}

.sidebar-menu li a:hover {
    background: rgba(37, 99, 235, 0.08);
    color: var(--primary-color);
}

.sidebar-menu li a:hover i {
    color: var(--primary-color);
    transform: scale(1.15);
    transition: transform 0.2s ease, color 0.2s ease;
}

.sidebar:not(.collapsed) .sidebar-menu li a:hover {
    transform: translateX(5px);
}

/* Efek saat diklik / disentuh (active state) */
.sidebar-menu li a:active {
    background: rgba(37, 99, 235, 0.2) !important;
    transform: translateX(3px) scale(0.98) !important;
    box-shadow: inset 0 0 0 2px rgba(37, 99, 235, 0.3) !important;
    transition: all 0.1s ease !important;
}

.sidebar-menu li.active a {
    background: #e3f2fd;
    font-weight: 600;
    color: var(--primary-color);
}


.sidebar.collapsed .sidebar-menu li a::after {
    content: attr(data-tooltip);
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    background: var(--dark-color);
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    margin-left: 10px;
    font-size: 0.85rem;
    pointer-events: none;
    z-index: 1001;
}

.sidebar.collapsed .sidebar-menu li a:hover::after {
    opacity: 1;
    visibility: visible;
}

/* Menu Separator */
.menu-separator {
    padding: 20px 15px 10px;
    font-size: 0.75rem;
    font-weight: 700;
    opacity: 0.6;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    color: var(--text-color);
}

.menu-separator span {
    transition: all 0.3s ease;
}

/* Sidebar Overlay (Mobile) */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar-overlay.active {
    display: block;
    opacity: 1;
}

/* ================================================
   MAIN CONTENT
   ================================================ */

.main-content {
    margin-left: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: none;
}

/* ================================================
   HEADER
   ================================================ */

.header {
    height: var(--header-height);
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
    position: sticky;
    top: 0;
    z-index: 1000; /* Above sidebar */
    will-change: auto;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.menu-toggle {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-color);
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.menu-toggle:hover {
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary-color);
}

.menu-toggle:active {
    background: rgba(37, 99, 235, 0.22) !important;
    transform: scale(0.92) !important;
    transition: all 0.1s ease !important;
}

.page-title h2 {
    font-size: 1.5rem;
    color: var(--dark-color);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 25px;
    min-width: 0;
}

.datetime-display {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0.55rem 0.9rem;
    background: rgba(37, 99, 235, 0.12);
    border: 1px solid rgba(37, 99, 235, 0.25);
    color: #1e3a8a;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 500;
    min-width: 0;
    max-width: 420px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.datetime-display span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 8px 15px;
    border-radius: 10px;
    transition: all 0.3s ease;
    position: relative;
}

.user-menu:hover {
    background: rgba(37, 99, 235, 0.1);
}

.user-menu.active {
    background: rgba(37, 99, 235, 0.15);
}

.user-avatar-small {
    font-size: 2rem;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-avatar-small i {
    font-size: 2rem;
}

.dropdown-icon {
    font-size: 0.8rem;
    transition: transform 0.3s ease;
    color: #6b7280;
}

.user-menu.active .dropdown-icon {
    transform: rotate(180deg);
}

/* Dropdown DateTime Mobile */
.dropdown-datetime-mobile {
    display: none;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    font-size: 0.85rem;
    color: var(--text-color);
}

.dropdown-datetime-mobile i {
    color: var(--primary-color);
    font-size: 0.9rem;
}

/* User Dropdown */
.user-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 20px;
    width: 320px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1001;
    overflow: hidden;
    pointer-events: none;
}

.user-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.dropdown-header {
    padding: 20px;
    background: white;
    color: var(--dark-color);
    display: flex;
    gap: 15px;
    align-items: center;
    border-bottom: 1px solid #e5e7eb;
}

.dropdown-avatar {
    font-size: 3rem;
    opacity: 0.9;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
}

.dropdown-avatar i {
    font-size: 3rem;
    color: var(--primary-color);
}

.dropdown-user-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.dropdown-user-info strong {
    font-size: 1.1rem;
    font-weight: 600;
}

.user-email {
    font-size: 0.85rem;
    opacity: 0.7;
    word-break: break-all;
    color: var(--text-color);
}

.user-role {
    display: inline-block;
    margin-top: 5px;
    font-size: 0.75rem;
    padding: 3px 10px;
    border-radius: 5px;
}

.badge-info {
    background: #e3f2fd;
    color: #1565c0;
}

.dropdown-divider {
    height: 1px;
    background: #e5e7eb;
    margin: 0;
}

.dropdown-menu-items {
    padding: 10px;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    border-radius: 8px;
    text-decoration: none;
    color: #374151;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

.dropdown-item:hover {
    background: #f3f4f6;
    color: var(--primary-color);
}

.dropdown-item i {
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
    color: #6b7280;
}

.dropdown-item:hover i {
    color: var(--primary-color);
}

.logout-item {
    color: #ef4444;
}

.logout-item:hover {
    background: #fee2e2;
    color: #dc2626;
}

/* ================================================
   UPLOAD PROGRESS SECTION (in User Dropdown)
   ================================================ */

.upload-notification-section {
    border-top: 1px solid #e2e8f0;
}

.upload-dropdown-header-inline {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    background: #ffffff;
    color: #64748b;
    font-weight: 600;
    font-size: 12px;
    border-bottom: 1px solid #e2e8f0;
}

.upload-dropdown-header-inline > span {
    display: flex;
    align-items: center;
}

.upload-dropdown-header-inline i {
    margin-right: 6px;
    color: #3b82f6;
}

.upload-dropdown-actions-inline {
    display: flex;
    gap: 4px;
}

.upload-dropdown-actions-inline button {
    background: #f1f5f9;
    border: none;
    color: #64748b;
    width: 24px;
    height: 24px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    font-size: 11px;
}

.upload-dropdown-actions-inline button:hover {
    background: #e2e8f0;
    color: #3b82f6;
}

.upload-dropdown-body-inline {
    max-height: 200px;
    overflow-y: auto;
    background: #f8fafc;
}

.upload-dropdown-footer-inline {
    padding: 8px 16px;
    background: #f1f5f9;
    border-top: 1px solid #e2e8f0;
    font-size: 11px;
    color: #64748b;
    text-align: center;
}

.upload-dropdown-empty {
    padding: 24px 16px;
    text-align: center;
    color: #94a3b8;
}

.upload-dropdown-empty i {
    font-size: 24px;
    margin-bottom: 8px;
    opacity: 0.5;
    display: block;
    color: #94a3b8;
}

.upload-dropdown-empty p {
    margin: 0;
    font-size: 12px;
}

/* Upload Dropdown Item */
.upload-dropdown-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid #f1f5f9;
    position: relative;
    transition: background 0.2s;
}

.upload-dropdown-item:hover {
    background: #f8fafc;
}

.upload-dropdown-item:last-child {
    border-bottom: none;
}

.upload-dropdown-item.uploading {
    background: #eff6ff;
}

.upload-dropdown-item.success {
    background: #f0fdf4;
}

.upload-dropdown-item.error {
    background: #fef2f2;
}

.upload-dropdown-item-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e2e8f0;
    border-radius: 6px;
    color: #64748b;
    font-size: 14px;
    flex-shrink: 0;
}

.upload-dropdown-item.uploading .upload-dropdown-item-icon {
    background: #dbeafe;
    color: #3b82f6;
}

.upload-dropdown-item.success .upload-dropdown-item-icon {
    background: #dcfce7;
    color: #22c55e;
}

.upload-dropdown-item.error .upload-dropdown-item-icon {
    background: #fee2e2;
    color: #ef4444;
}

.upload-dropdown-item-content {
    flex: 1;
    min-width: 0;
}

.upload-dropdown-item-name {
    font-size: 13px;
    font-weight: 500;
    color: #1e293b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
}

.upload-dropdown-item-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    color: #64748b;
}

.upload-dropdown-item-progress {
    width: 100%;
    height: 3px;
    background: #e2e8f0;
    border-radius: 2px;
    margin-top: 6px;
    overflow: hidden;
}

.upload-dropdown-item-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6 0%, #2563eb 100%);
    border-radius: 2px;
    transition: width 0.2s ease;
    width: 0%;
}

.upload-dropdown-item.success .upload-dropdown-item-progress-bar {
    background: linear-gradient(90deg, #22c55e 0%, #16a34a 100%);
    width: 100%;
}

.upload-dropdown-item-dismiss {
    position: absolute;
    top: 8px;
    right: 8px;
    background: transparent;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    opacity: 0;
    transition: all 0.2s;
}

.upload-dropdown-item:hover .upload-dropdown-item-dismiss {
    opacity: 1;
}

.upload-dropdown-item-dismiss:hover {
    background: #fee2e2;
    color: #ef4444;
}

/* Mobile: always show dismiss button (no hover on touch devices) */
@media (max-width: 768px) {
    .upload-dropdown-item-dismiss {
        opacity: 1;
        padding: 8px;
        min-width: 32px;
        min-height: 32px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

/* ================================================
   CONTENT AREA
   ================================================ */

.content-wrapper {
    padding: 30px;
    flex: 1;
    overflow-x: hidden;
}

/* Dashboard */
.dashboard {
    width: 100%;
}

.dashboard h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: var(--dark-color);
}

.dashboard > p {
    color: #374151;
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 2rem;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

/* Upload Card - Same styling as category/action cards */
.stat-card.upload-card {
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 1rem;
    padding: 1.5rem;
    transition: all 0.3s ease;
    box-shadow: none;
}

.stat-card.upload-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-color);
    background: #eff6ff;
}

/* Category Section */
.category-section {
    margin-bottom: 2rem;
}

.category-section h2 {
    font-size: 1.5rem;
    color: var(--dark-color);
    margin-bottom: 1rem;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

/* Row for single extra category (centered under main grid) */
.category-row {
    display: flex;
    justify-content: center;
    margin-top: 1rem;
}

.category-row .category-card {
    width: 100%;
}

.category-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 2rem 1rem;
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 1rem;
    text-decoration: none;
    color: var(--dark-color);
    transition: all 0.3s ease;
    cursor: pointer;
    min-height: 150px;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-color);
    background: #eff6ff;
}

.category-card i {
    font-size: 2.5rem;
    color: var(--primary-color);
    transition: all 0.3s ease;
}

.category-card:hover i {
    transform: scale(1.1);
}

.category-card h3 {
    font-size: 0.95rem;
    font-weight: 600;
    text-align: center;
    margin: 0;
}

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 1rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.stat-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.stat-card h3 {
    font-size: 0.95rem;
    color: #6b7280;
    font-weight: 500;
}

.stat-card-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.stat-card-icon.blue {
    background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
    color: white;
}

.stat-card-icon.green {
    background: linear-gradient(135deg, #34d399 0%, #10b981 100%);
    color: white;
}

.stat-card-icon.purple {
    background: linear-gradient(135deg, #a78bfa 0%, #8b5cf6 100%);
    color: white;
}

.stat-card-icon.orange {
    background: linear-gradient(135deg, #fb923c 0%, #f97316 100%);
    color: white;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--dark-color);
}

.stat-label {
    font-size: 0.875rem;
    color: #6b7280;
    margin-top: 0.5rem;
}

/* Progress Bar */
.progress-bar {
    height: 12px;
    background: #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
    margin-top: 1rem;
}

.progress-fill {
    height: 100%;
    transition: width 0.5s ease;
    border-radius: 10px;
}

/* Quick Actions */
.quick-actions {
    margin-bottom: 2rem;
}

.quick-actions h2 {
    font-size: 1.5rem;
    color: var(--dark-color);
    margin-bottom: 1rem;
}

.action-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.action-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 2rem 1rem;
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 1rem;
    text-decoration: none;
    color: var(--dark-color);
    transition: all 0.3s ease;
    cursor: pointer;
    min-height: 150px;
}

.action-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-color);
    background: #eff6ff;
}

.action-card i {
    font-size: 2.5rem;
    color: var(--primary-color);
    transition: all 0.3s ease;
}

.action-card:hover i {
    transform: scale(1.1);
}

.action-card span {
    font-size: 0.95rem;
    font-weight: 600;
    text-align: center;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    border: none;
    border-radius: 0.75rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(37, 99, 235, 0.3);
}

.btn-secondary {
    background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
    color: white;
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(59, 130, 246, 0.3);
}

.btn-info {
    background: linear-gradient(135deg, #a78bfa 0%, #8b5cf6 100%);
    color: white;
}

.btn-info:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(139, 92, 246, 0.3);
}

.btn-success {
    background: linear-gradient(135deg, #34d399 0%, #10b981 100%);
    color: white;
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(16, 185, 129, 0.3);
}

.btn-danger {
    background: linear-gradient(135deg, #f87171 0%, #ef4444 100%);
    color: white;
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(239, 68, 68, 0.25);
}

.btn-outline {
    background: white;
    color: var(--dark-color);
    border: 2px solid var(--border-color);
}

.btn-outline:hover {
    transform: translateY(-1px);
    border-color: #cbd5e1;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
}

.btn-sm {
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    border-radius: 0.6rem;
}

/* ================================================
   CONFIRM MODAL (GLOBAL)
   ================================================ */

.confirm-modal {
    position: fixed;
    inset: 0;
    display: none;
    z-index: 2000;
}

.confirm-modal.active {
    display: block;
}

.confirm-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(2px);
}

.confirm-modal__dialog {
    position: absolute;
    left: 50%;
    top: 18%;
    transform: translateX(-50%);
    width: min(520px, calc(100% - 32px));
    background: white;
    border-radius: 16px;
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(226, 232, 240, 0.9);
    overflow: hidden;
}

.confirm-modal__header {
    display: grid;
    grid-template-columns: 44px 1fr 40px;
    gap: 12px;
    align-items: start;
    padding: 18px 18px 14px;
}

.confirm-modal__icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(245, 158, 11, 0.15);
    color: #b45309;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.confirm-modal__title {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--dark-color);
}

.confirm-modal__message {
    margin-top: 4px;
    font-size: 0.92rem;
    color: #64748b;
    line-height: 1.45;
    word-break: break-word;
}

.confirm-modal__close {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    background: white;
    color: #64748b;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.confirm-modal__close:hover {
    background: #f8fafc;
}

.confirm-modal__actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 0 18px 18px;
}

/* Access Code Modal: always center (desktop + mobile) */
#accessCodeModal .confirm-modal__dialog {
    position: fixed !important;
    left: 50% !important;
    top: 50% !important;
    right: auto !important;
    bottom: auto !important;
    transform: translate(-50%, -50%) !important;
    width: min(480px, calc(100vw - 32px)) !important;
    max-width: calc(100vw - 32px) !important;
    max-height: calc(100vh - 32px) !important;
    margin: 0 !important;
    overflow: auto;
    overscroll-behavior: contain;
}

#accessCodeModal .confirm-modal__header {
    padding: 18px 18px 14px;
}

#accessCodeModal .confirm-modal__actions {
    padding: 0 18px 18px;
}

#accessCodeModal .confirm-modal__icon {
    background: rgba(37, 99, 235, 0.12);
    color: #2563eb;
}

@media (max-width: 480px) {
    .confirm-modal__dialog {
        top: 14%;
    }
    .confirm-modal__actions {
        flex-direction: column-reverse;
    }
    .confirm-modal__actions .btn {
        width: 100%;
    }
}

/* ================================================
   RESPONSIVE
   ================================================ */

@media (max-width: 1024px) {
    /* Tablet */
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .header {
        padding: 0 20px;
    }
    
    .content-wrapper {
        padding: 20px;
    }
}

/* ================================================
   RESPONSIVE BREAKPOINTS
   ================================================ */

/* Large Desktop (1200px+) */
@media (min-width: 1200px) {
    .category-grid,
    .action-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 1.25rem;
    }
    
    .category-card,
    .action-card {
        min-height: 160px;
        padding: 2.25rem 1.25rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

/* Desktop (992px - 1199px) */
@media (min-width: 992px) and (max-width: 1199px) {
    .category-grid,
    .action-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 1rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }
}

/* Tablet Landscape (769px - 991px) */
@media (min-width: 769px) and (max-width: 991px) {
    .category-grid,
    .action-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.875rem;
    }
    
    .category-card,
    .action-card {
        min-height: 130px;
        padding: 1.5rem 1rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

/* Tablet Portrait & Mobile Landscape (601px - 768px) */
@media (min-width: 601px) and (max-width: 768px) {
    .category-grid,
    .action-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    
    .category-card,
    .action-card {
        min-height: 120px;
        padding: 1.25rem 0.875rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

@media (max-width: 768px) {
    /* Mobile */
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        margin-bottom: 1.5rem;
    }

    .stat-card.upload-card {
        padding: 1rem;
    }

    .upload-card {
        order: 2;
    }
    
    .stat-card {
        padding: 0.875rem;
    }
    
    /* Compact header di stat card */
    .stat-card > div:first-child {
        gap: 0.5rem !important;
        margin-bottom: 0.75rem !important;
    }
    
    .stat-card h3 {
        font-size: 0.7rem !important;
        line-height: 1.2;
    }
    
    .stat-card p {
        font-size: 0.65rem !important;
        line-height: 1.2;
    }
    
    /* Icon lebih kecil */
    .stat-card i.fa-link,
    .stat-card i.fa-file-alt,
    .stat-card i.fa-clock-rotate-left {
        font-size: 1.75rem !important;
    }
    
    /* Stat number lebih kecil */
    .stat-card .stat-number {
        font-size: 1.75rem !important;
    }
    
    /* Progress bar lebih kecil */
    .stat-card .progress-bar,
    .stat-card > div[style*="height: 10px"] {
        height: 6px !important;
        margin-bottom: 0.5rem !important;
    }
    
    /* Upload list lebih compact */
    .stat-card > div[style*="max-height"] {
        max-height: 100px !important;
    }
    
    .stat-card > div[style*="max-height"] > div > div {
        padding: 0.375rem !important;
        font-size: 0.7rem !important;
    }
    
    .stat-card > div[style*="max-height"] i.fa-file {
        font-size: 0.75rem !important;
    }
    
    .stat-card > div[style*="max-height"] div[style*="font-weight: 600"] {
        font-size: 0.7rem !important;
    }
    
    .stat-card > div[style*="max-height"] div[style*="font-size: 0.75rem"] {
        font-size: 0.65rem !important;
    }
    
    .header {
        padding: 0 15px;
    }
    
    .header-left {
        gap: 10px;
    }
    
    .page-title h2 {
        font-size: 1.2rem;
    }
    
    .datetime-display {
        display: none;
    }
    
    .dropdown-datetime-mobile {
        display: flex;
    }
    
    .user-menu span {
        display: none;
    }
    
    .content-wrapper {
        padding: 15px;
    }
    
    .category-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }
    
    .category-card {
        min-height: 80px;
        padding: 0.65rem 0.5rem;
    }
    
    .category-card i {
        font-size: 1.5rem;
    }
    
    .category-card h3 {
        font-size: 0.7rem;
    }
    
    .action-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 0.5rem;
    }
    
    .action-card {
        min-height: 75px;
        padding: 0.5rem 0.35rem;
        flex-direction: column;
    }
    
    .action-card i {
        font-size: 1.35rem;
        margin-bottom: 0.25rem;
    }
    
    .action-card span {
        font-size: 0.65rem;
        text-align: center;
        line-height: 1.1;
    }
}

@media (max-width: 480px) {
    body {
        font-size: 14px;
    }
    
    .page-title h2 {
        font-size: 1rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .category-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }
    
    .category-card {
        min-height: 75px;
        padding: 0.6rem 0.5rem;
    }
    
    .category-card i {
        font-size: 1.35rem;
    }
    
    .category-card h3 {
        font-size: 0.65rem;
    }
    
    .action-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 0.5rem;
    }
    
    .action-card {
        min-height: 70px;
        padding: 0.5rem 0.3rem;
        flex-direction: column;
    }
    
    .action-card i {
        font-size: 1.25rem;
        margin-bottom: 0.25rem;
    }
    
    .action-card span {
        font-size: 0.6rem;
        text-align: center;
        line-height: 1.1;
    }
}

/* Tablet Portrait (481px - 600px) */
@media (min-width: 481px) and (max-width: 600px) {
    .category-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    
    .action-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    
    .category-card,
    .action-card {
        min-height: 110px;
        padding: 1rem;
    }
}

/* ================================================
   FILE MANAGER & UPLOAD STYLES
   ================================================ */

/* Page Header */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.page-header h1 {
    font-size: 2rem;
    color: var(--dark-color);
}

/* File Upload Area */
.file-upload-area {
    border: 2px dashed var(--border-color);
    border-radius: 1rem;
    padding: 3rem 2rem;
    text-align: center;
    transition: all 0.3s ease;
    background: white;
    cursor: pointer;
}

.file-upload-area:hover,
.file-upload-area.drag-over {
    border-color: var(--primary-color);
    background: #eff6ff;
}

.file-upload-area i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.file-upload-area p {
    color: var(--text-color);
    margin: 0.5rem 0;
}

/* File Manager Filters */
.file-filters {
    background: white;
    padding: 1.5rem;
    border-radius: 1rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-bottom: 1.5rem;
}

.filter-row {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: center;
}

.filter-row label {
    font-weight: 600;
    color: var(--dark-color);
    min-width: 80px;
}

.filter-row select,
.filter-row input {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    font-size: 0.9rem;
    flex: 1;
    min-width: 200px;
}

/* File Grid/List */
.files-container {
    background: white;
    padding: 1.5rem;
    border-radius: 1rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.files-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
}

.file-item {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    padding: 1rem;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.file-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-color);
}

.file-icon {
    font-size: 3rem;
    margin-bottom: 0.75rem;
}

.file-name {
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
    word-break: break-word;
}

.file-details {
    font-size: 0.875rem;
    color: var(--text-color);
}

/* File meta (size & date) - always visible */
.file-meta {
    display: flex;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: #64748b;
    margin-top: 0.15rem;
}

/* Form Styles */
.form-container {
    background: white;
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
}

/* Tables */
.table-container {
    background: white;
    border-radius: 1rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

table {
    width: 100%;
    border-collapse: collapse;
}

table thead {
    background: #f9fafb;
}

table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: var(--dark-color);
    border-bottom: 2px solid var(--border-color);
}

table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-color);
}

table tbody tr:hover {
    background: #f9fafb;
}

/* Alert Messages */
.alert {
    padding: 1rem 1.5rem;
    border-radius: 0.75rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #6ee7b7;
}

.alert-error {
    background: #e0f7f4;
    color: #0d4d47;
    border: 1px solid #50e3c2;
}

.alert-info {
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid #93c5fd;
}

.alert-warning {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fcd34d;
}

/* ================================================
   FOOTER
   ================================================ */

.main-footer {
    position: relative;
    background: transparent;
    padding: 0.75rem 2rem;
    margin-top: auto;
    transition: all 0.3s ease;
}

.footer-content {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    font-size: 0.8125rem;
    color: #64748b;
    font-weight: 500;
}

.footer-content span {
    white-space: nowrap;
}

.footer-divider {
    color: #cbd5e1;
    font-weight: 300;
}

/* ================================================
   RESPONSIVE STYLES
   ================================================ */

/* Tablet */
@media (max-width: 1024px) {
    .content-wrapper {
        padding: 1.5rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .category-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile */
@media (max-width: 768px) {
    .content-wrapper {
        padding: 1rem;
    }
    
    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .page-header h1 {
        font-size: 1.5rem;
    }
    
    .category-grid {
        grid-template-columns: 1fr;
    }

    /* Dashboard categories: always 2x2 (4 items) on mobile */
    .dashboard .category-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }

    .dashboard .category-card {
        min-height: 80px;
        padding: 0.65rem 0.5rem;
    }

    .dashboard .category-card i {
        font-size: 1.5rem;
    }

    .dashboard .category-card h3 {
        font-size: 0.7rem;
    }

    .action-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.5rem !important;
    }

    .action-card {
        min-height: 80px !important;
        padding: 0.65rem 0.5rem !important;
        gap: 0.5rem !important;
    }

    .action-card i {
        font-size: 1.5rem !important;
    }

    .action-card span {
        font-size: 0.7rem !important;
    }

    /* Dashboard section titles smaller on mobile */
    .category-section h2,
    .quick-actions h2 {
        font-size: 1rem !important;
        margin-bottom: 0.75rem !important;
    }

    /* Welcome text smaller on mobile */
    .dashboard > p:first-child {
        font-size: 0.85rem !important;
        margin-bottom: 1rem !important;
    }

    /* Stats grid compact on mobile */
    .stats-grid {
        margin-top: 1rem;
    }

    table th,
    table td {
        padding: 0.75rem 0.5rem;
        font-size: 0.8rem;
    }


    table th.hide-mobile,
    table td.hide-mobile {
        display: none;
    }

    .hide-desktop {
        display: none;
    }
    @media (max-width: 768px) {
        .hide-desktop {
            display: inline;
        }
        .file-details .file-name {
            font-size: 0.75rem !important;
        }
        .file-meta-category {
            font-size: 0.65rem;
            color: #64748b;
        }
        .file-meta-category i {
            vertical-align: middle;
        }
    }

    /* File info layout: name on top, size & date below */
    .file-info {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 0.25rem !important;
    }

    .file-info .file-icon {
        display: none;
    }

    .file-details {
        display: flex;
        flex-direction: column;
        gap: 0.15rem;
    }

    .file-details .file-name {
        font-size: 0.8rem !important;
        font-weight: 600 !important;
    }

    /* Show size & date below filename in mobile */
    .file-details .file-meta {
        display: flex;
        gap: 0.5rem;
        font-size: 0.7rem;
        color: #64748b;
    }

    /* Compact action buttons */
    .btn-group {
        gap: 0.15rem !important;
    }

    .btn-sm {
        padding: 0.3rem 0.5rem !important;
        font-size: 0.7rem !important;
    }
    
    .file-filters {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-group {
        width: 100%;
    }
    
    .filter-group input,
    .filter-group select {
        width: 100%;
    }
    
    .files-grid {
        grid-template-columns: 1fr;
    }
    
    .form-container {
        padding: 1.5rem;
    }
    
    .form-header i {
        font-size: 3rem;
    }
    
    .form-header h2 {
        font-size: 1.5rem;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .form-actions button,
    .form-actions a {
        width: 100%;
    }

    #accessCodeModal .confirm-modal__dialog {
        position: fixed !important;
        left: 50% !important;
        top: 50% !important;
        right: auto !important;
        bottom: auto !important;
        transform: translate(-50%, -50%) !important;
        width: min(400px, calc(100vw - 24px)) !important;
        max-width: calc(100vw - 24px) !important;
        max-height: calc(100vh - 24px) !important;
        margin: 0 !important;
        overflow: auto;
        overscroll-behavior: contain;
    }

    #accessCodeModal .confirm-modal__header {
        padding: 14px 14px 10px;
        grid-template-columns: 40px 1fr 36px;
        gap: 10px;
    }

    #accessCodeModal .confirm-modal__icon {
        width: 38px;
        height: 38px;
        border-radius: 10px;
        font-size: 1.05rem;
    }

    #accessCodeModal .confirm-modal__close {
        width: 36px;
        height: 36px;
        border-radius: 10px;
    }

    #accessCodeModal .confirm-modal__title {
        font-size: 0.98rem;
    }

    #accessCodeModal .confirm-modal__message {
        font-size: 0.84rem;
    }

    #accessCodeModal .confirm-modal__actions {
        padding: 0 14px 14px;
    }

    /* Override inline gap/margins inside modal */
    #accessCodeModal .confirm-modal__actions > div {
        gap: 9px !important;
    }

    #accessCodeModal .confirm-modal__actions > div + div {
        margin-top: 12px !important;
        gap: 9px !important;
    }

    #accessCodeModal #accessCodeHint {
        font-size: 0.78rem;
    }

    #accessCodeModal #accessCodeError {
        font-size: 0.82rem;
        padding: 9px 10px;
        border-radius: 10px;
    }

    #accessCodeModal .btn {
        padding: 0.6rem 0.9rem;
        font-size: 0.9rem;
    }

    #accessCodeModal input#accessCodeOld,
    #accessCodeModal input#accessCodeNew {
        padding: 10px 12px !important;
        border-radius: 10px !important;
        font-size: 0.92rem;
    }

    #accessCodeModal label {
        font-size: 0.82rem !important;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .header {
        padding: 0 12px;
    }

    .header-right {
        gap: 0.5rem;
        flex-wrap: nowrap;
        justify-content: flex-end;
        align-items: center;
    }

    .header-actions {
        gap: 0.5rem;
        align-items: center;
    }

    .user-menu {
        padding: 6px 10px;
        gap: 8px;
        border-radius: 10px;
    }

    .user-avatar-small {
        width: 30px;
        height: 30px;
    }

    .user-avatar-small img {
        width: 30px !important;
        height: 30px !important;
    }

    .user-dropdown {
        right: 12px;
        width: min(360px, calc(100vw - 24px));
    }
    
    .datetime-display {
        display: none;
    }

    .dropdown-datetime-mobile {
        display: flex;
    }

 
    #accessCodeModal .confirm-modal__dialog {
        position: fixed !important;
        left: 50% !important;
        top: 50% !important;
        right: auto !important;
        bottom: auto !important;
        transform: translate(-50%, -50%) !important;
        width: min(320px, calc(100vw - 20px)) !important;
        max-width: calc(100vw - 20px) !important;
        max-height: calc(100vh - 20px) !important;
        margin: 0 !important;
        overflow: auto;
        overscroll-behavior: contain;
    }

    #accessCodeModal .confirm-modal__header {
        padding: 11px 11px 8px;
        grid-template-columns: 34px 1fr 32px;
        gap: 8px;
    }

    #accessCodeModal .confirm-modal__icon {
        width: 34px;
        height: 34px;
        border-radius: 10px;
        font-size: 0.95rem;
    }

    #accessCodeModal .confirm-modal__close {
        width: 32px;
        height: 32px;
        border-radius: 8px;
    }

    #accessCodeModal .confirm-modal__title {
        font-size: 0.9rem;
    }

    #accessCodeModal .confirm-modal__message {
        font-size: 0.78rem;
    }

    #accessCodeModal .confirm-modal__actions {
        padding: 0 11px 11px;
    }

    #accessCodeModal .confirm-modal__actions > div {
        gap: 8px !important;
    }

    #accessCodeModal .confirm-modal__actions > div + div {
        margin-top: 10px !important;
        gap: 8px !important;
    }

    #accessCodeModal #accessCodeHint {
        font-size: 0.72rem;
    }

    #accessCodeModal #accessCodeError {
        font-size: 0.78rem;
        padding: 8px 10px;
        border-radius: 8px;
    }

    #accessCodeModal .btn {
        padding: 0.5rem 0.8rem;
        font-size: 0.84rem;
    }

    #accessCodeModal input#accessCodeOld,
    #accessCodeModal input#accessCodeNew {
        padding: 8px 10px !important;
        border-radius: 8px !important;
        font-size: 0.86rem;
    }

    #accessCodeModal label {
        font-size: 0.76rem !important;
    }
    
    .stat-card {
        padding: 1.25rem;
    }
    
    .btn {
        padding: 0.625rem 1rem;
        font-size: 0.875rem;
    }
    
    .file-upload-area {
        padding: 2rem 1rem;
    }
    
    .file-upload-area i {
        font-size: 2rem;
    }
}

/* ================================================
   ANIMATIONS
   ================================================ */

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}


/* ===========================
   TABLE PAGINATION STYLES
   =========================== */

.pagination-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1.5rem;
    padding: 1.25rem 1.5rem;
    background: linear-gradient(to right, #f8fafc, #f1f5f9);
    border-radius: 0.75rem;
    border: 1px solid #e2e8f0;
    flex-wrap: wrap;
    gap: 1rem;
}

.rows-per-page {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.875rem;
    color: #475569;
    font-weight: 500;
}

.rows-per-page label {
    font-weight: 600;
    color: #334155;
}

.rows-select {
    padding: 0.5rem 2.5rem 0.5rem 0.875rem;
    border: 2px solid #cbd5e1;
    border-radius: 0.5rem;
    background: white;
    font-size: 0.875rem;
    font-weight: 600;
    color: #1e293b;
    cursor: pointer;
    transition: all 0.2s ease;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath fill='%23475569' d='M4.22 6.22a.75.75 0 011.06 0L8 8.94l2.72-2.72a.75.75 0 111.06 1.06l-3.25 3.25a.75.75 0 01-1.06 0L4.22 7.28a.75.75 0 010-1.06z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.625rem center;
    min-width: 80px;
}

.rows-select:hover {
    border-color: var(--primary-color);
    background-color: #f8fafc;
}

.rows-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(80, 227, 194, 0.15);
}

.pagination-buttons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.375rem;
    flex-wrap: wrap;
}

.pagination-btn {
    min-width: 38px;
    height: 38px;
    padding: 0.5rem;
    border: 2px solid #cbd5e1;
    background: white;
    color: #475569;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pagination-btn:hover:not(.disabled):not(.active) {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(80, 227, 194, 0.25);
}

.pagination-btn.active {
    background: linear-gradient(135deg, var(--primary-color) 0%, #3fb89f 100%);
    color: white;
    border-color: var(--primary-color);
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(80, 227, 194, 0.3);
}

.pagination-btn.disabled {
    opacity: 0.35;
    cursor: not-allowed;
    background: #f1f5f9;
    border-color: #e2e8f0;
}

.pagination-ellipsis {
    padding: 0.5rem 0.25rem;
    color: #94a3b8;
    font-weight: 600;
    font-size: 0.875rem;
}

.pagination-info {
    display: none; /* Hidden by default, info in rows-per-page section */
}
/* Mobile Responsive */
@media (max-width: 768px) {
    .pagination-container {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
        padding: 1rem;
    }
    
    .rows-per-page {
        justify-content: center;
        order: 2; /* Show below pagination buttons */
    }
    
    .pagination-buttons {
        order: 1;
        justify-content: center;
    }
    
    .pagination-btn {
        min-width: 34px;
        height: 34px;
        font-size: 0.8125rem;
    }
}

@media (max-width: 480px) {
    .pagination-container {
        padding: 0.875rem;
    }
    
    .pagination-buttons {
        gap: 0.25rem;
    }
    
    .pagination-btn {
        min-width: 32px;
        height: 32px;
        font-size: 0.78rem;
    }
}

/* Footer Mobile Responsive */
@media (max-width: 768px) {
    .main-footer {
        padding: 0.625rem 1rem;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 0.25rem;
        font-size: 0.75rem;
    }
    
    .footer-divider {
        display: none;
    }
}

@media (max-width: 480px) {
    .main-footer {
        padding: 0.5rem 0.75rem;
    }
    
    .footer-content {
        font-size: 0.7rem;
    }
}


/* ================================================
   BUTTON FOCUS & TAP HIGHLIGHT OVERRIDES
   ================================================ */

/*
 * 1. Hapus outline default di semua elemen interaktif
 *    (tap highlight sudah dihapus via * selector di atas)
 */
button,
a,
input[type="button"],
input[type="submit"],
input[type="reset"],
select,
[role="button"],
.btn,
.pagination-btn,
.menu-toggle,
.sidebar-toggle,
.rows-select {
    outline: none;
}

button:focus,
a:focus,
input[type="button"]:focus,
input[type="submit"]:focus,
input[type="reset"]:focus,
[role="button"]:focus,
.btn:focus,
.pagination-btn:focus,
.menu-toggle:focus,
.sidebar-toggle:focus {
    outline: none;
    box-shadow: none;
}

button:active,
a:active,
input[type="button"]:active,
input[type="submit"]:active,
input[type="reset"]:active,
[role="button"]:active,
.btn:active,
.pagination-btn:active,
.menu-toggle:active,
.sidebar-toggle:active {
    outline: none;
    box-shadow: none;
}

/*
 * 2. Tampilkan focus ring HANYA saat navigasi keyboard (Tab)
 *    via :focus-visible — tidak muncul saat diklik mouse/touch
 */
button:focus-visible,
a:focus-visible,
input[type="button"]:focus-visible,
input[type="submit"]:focus-visible,
input[type="reset"]:focus-visible,
select:focus-visible,
[role="button"]:focus-visible,
.btn:focus-visible,
.pagination-btn:focus-visible,
.menu-toggle:focus-visible,
.sidebar-toggle:focus-visible,
.rows-select:focus-visible {
    outline: 2px solid var(--primary-color) !important;
    outline-offset: 3px !important;
    border-radius: 10px !important;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15) !important;
}

/*
 * 3. Fallback browser lama yang belum support :focus-visible
 */
@supports not selector(:focus-visible) {
    button:focus,
    a:focus,
    input[type="button"]:focus,
    input[type="submit"]:focus,
    input[type="reset"]:focus,
    select:focus,
    [role="button"]:focus,
    .btn:focus,
    .pagination-btn:focus,
    .menu-toggle:focus,
    .sidebar-toggle:focus {
        outline: 2px solid var(--primary-color);
        outline-offset: 3px;
        border-radius: 10px;
        box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15);
    }
}