/* ===== SIMONTIR - Modern Design System ===== */

/* CSS Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Modern Sky Blue Color Palette */
    --primary-50: #f0f9ff;
    --primary-100: #e0f2fe;
    --primary-200: #bae6fd;
    --primary-300: #7dd3fc;
    --primary-400: #38bdf8;
    --primary-500: #0ea5e9;
    --primary-600: #0284c7;
    --primary-700: #0369a1;
    --primary-800: #075985;
    --primary-900: #0c4a6e;
    
    /* Enhanced Gradients */
    --gradient-primary: linear-gradient(135deg, var(--primary-500), var(--primary-600));
    --gradient-success: linear-gradient(135deg, var(--success), #059669);
    --gradient-warning: linear-gradient(135deg, var(--warning), #d97706);
    --gradient-error: linear-gradient(135deg, var(--error), #dc2626);
    --gradient-bg: linear-gradient(135deg, var(--primary-50) 0%, var(--primary-100) 50%, var(--primary-200) 100%);
    
    /* Neutral Colors */
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;
    
    /* Status Colors */
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    --info: #3b82f6;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    
    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius: 0.5rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
    
    /* Typography */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    
    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
    
    /* Z-index layers */
    --z-dropdown: 1000;
    --z-sticky: 1020;
    --z-fixed: 1030;
    --z-modal: 1040;
    --z-popover: 1050;
    --z-tooltip: 1060;
}

body {
    font-family: var(--font-sans);
    background: var(--gradient-bg);
    background-attachment: fixed;
    line-height: 1.6;
    color: var(--gray-800);
    min-height: 100vh;
    font-size: 14px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    scroll-behavior: smooth;
    overflow-x: hidden;
}

/* ===== LAYOUT COMPONENTS ===== */

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1.5rem;
}

/* ===== LOGIN PAGE ===== */

.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--primary-400) 0%, var(--primary-600) 50%, var(--primary-800) 100%);
    padding: 1rem;
}

.login-box {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    padding: 2.5rem;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    width: 100%;
    max-width: 420px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.login-logo {
    text-align: center;
    margin-bottom: 2rem;
}

.login-logo img {
    height: 80px;
    width: auto;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
}

.login-box h2 {
    text-align: center;
    margin-bottom: 1rem;
    color: var(--gray-800);
    font-weight: 700;
    font-size: 1.875rem;
    background: linear-gradient(135deg, var(--primary-600), var(--primary-800));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.motivational-quote {
    background: linear-gradient(135deg, var(--primary-50), var(--primary-100));
    padding: 1rem;
    border-radius: var(--radius-md);
    margin-bottom: 2rem;
    border-left: 4px solid var(--primary-500);
}

.motivational-quote p {
    margin: 0;
    color: var(--primary-700);
    font-size: 0.875rem;
    line-height: 1.5;
    text-align: center;
    font-style: italic;
    font-weight: 500;
}

/* ===== HEADER ===== */

.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    padding: 1.5rem 2rem;
    margin-bottom: 2rem;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.logo {
    height: 60px;
    width: auto;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
}

.header-title h1 {
    color: var(--gray-800);
    margin: 0;
    font-size: 1.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-600), var(--primary-800));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header .subtitle {
    color: var(--gray-600);
    font-size: 0.875rem;
    margin: 0.25rem 0 0 0;
    line-height: 1.4;
    font-weight: 500;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--gray-700);
    font-weight: 600;
}

.logout-btn {
    background: linear-gradient(135deg, var(--error), #dc2626);
    color: white;
    padding: 0.75rem 1.5rem;
    text-decoration: none;
    border-radius: var(--radius-lg);
    transition: all 0.3s ease;
    font-weight: 600;
    font-size: 0.875rem;
    box-shadow: var(--shadow-md);
}

.logout-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* ===== NAVIGATION ===== */

.nav {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    padding: 1rem 2rem;
    margin-bottom: 2rem;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.nav ul {
    list-style: none;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.nav a {
    text-decoration: none;
    color: var(--gray-600);
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-lg);
    transition: all 0.3s ease;
    background: var(--gray-50);
    font-size: 0.875rem;
}

.nav a:hover, .nav a.active {
    background: linear-gradient(135deg, var(--primary-500), var(--primary-600));
    color: white;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

/* ===== CARDS ===== */

.card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    padding: 2rem;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    margin-bottom: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
}

.card h3 {
    margin-bottom: 1.5rem;
    color: var(--gray-800);
    font-size: 1.25rem;
    font-weight: 700;
    border-bottom: 2px solid var(--primary-200);
    padding-bottom: 0.75rem;
    background: linear-gradient(135deg, var(--primary-600), var(--primary-800));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===== SUMMARY CARDS ===== */

.summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.summary-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    padding: 2rem;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.summary-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, var(--primary-400), var(--primary-600));
}

.summary-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.summary-card h4 {
    color: var(--gray-600);
    margin-bottom: 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.summary-card .number {
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-600), var(--primary-800));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
}

.summary-card.total::before { background: linear-gradient(135deg, var(--primary-500), var(--primary-700)); }
.summary-card.selesai::before { background: linear-gradient(135deg, var(--success), #059669); }
.summary-card.proses::before { background: linear-gradient(135deg, var(--warning), #d97706); }
.summary-card.belum::before { background: linear-gradient(135deg, var(--error), #dc2626); }

/* ===== PROGRESS CARDS ===== */

.progress-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.progress-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    padding: 2rem;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.progress-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
}

.progress-card h4 {
    margin-bottom: 1rem;
    color: var(--gray-800);
    font-weight: 700;
    font-size: 1.125rem;
}

.progress-stats {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.progress-stats span {
    font-size: 0.875rem;
    color: var(--gray-600);
    font-weight: 600;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--gray-200);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin: 1rem 0;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(135deg, var(--success), #059669);
    transition: width 0.5s ease;
    border-radius: var(--radius-lg);
}

/* ===== TABLE STYLES ===== */

.table-container {
    overflow-x: auto;
    border-radius: var(--radius-xl);
    margin-top: 1rem;
    box-shadow: var(--shadow-lg);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 800px;
}

th, td {
    padding: 1rem 1.5rem;
    text-align: left;
    border-bottom: 1px solid var(--gray-200);
    vertical-align: middle;
    word-wrap: break-word;
}

th {
    background: linear-gradient(135deg, var(--primary-500), var(--primary-600));
    color: white;
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    white-space: nowrap;
    position: sticky;
    top: 0;
    z-index: 10;
}

/* Column Optimization */
th:nth-child(1), td:nth-child(1) { width: 100px; min-width: 100px; }
th:nth-child(2), td:nth-child(2) { width: 150px; min-width: 150px; }
th:nth-child(3), td:nth-child(3) { width: auto; min-width: 200px; }
th:nth-child(4), td:nth-child(4) { width: 120px; min-width: 120px; }
th:nth-child(5), td:nth-child(5) { width: 120px; min-width: 120px; }
th:nth-child(6), td:nth-child(6) { width: 200px; min-width: 200px; }

td:nth-child(3) {
    max-width: 300px;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

td:nth-child(2) {
    font-weight: 600;
    color: var(--gray-800);
}

tr:hover {
    background: var(--primary-50);
    transition: all 0.2s ease;
}

tr:last-child td {
    border-bottom: none;
}

/* ===== STATUS BADGES ===== */

.status {
    padding: 0.375rem 0.75rem;
    border-radius: var(--radius-lg);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-block;
    min-width: 80px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    white-space: nowrap;
}

.status.belum, .status.belum-selesai {
    background: linear-gradient(135deg, var(--error), #dc2626);
    color: white;
}

.status.sedang, .status.sedang-proses, .status.proses {
    background: linear-gradient(135deg, var(--warning), #d97706);
    color: white;
}

.status.selesai {
    background: linear-gradient(135deg, var(--success), #059669);
    color: white;
}

.status.butuh-tindak-lanjut {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    color: white;
}

/* ===== ACTION COLUMN ===== */

td:nth-child(6) {
    padding: 0.75rem 1rem;
    white-space: nowrap;
}

.action-container {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: stretch;
}

.action-row {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

td select {
    padding: 0.5rem 0.75rem;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    font-size: 0.75rem;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 100px;
    max-width: 120px;
    font-weight: 500;
    color: var(--gray-700);
    flex: 1;
}

td select:focus {
    outline: none;
    border-color: var(--primary-500);
    box-shadow: 0 0 0 3px var(--primary-100);
    background: white;
}

td select:hover {
    border-color: var(--primary-400);
    background: var(--gray-50);
}

td button {
    width: auto;
    padding: 0.5rem 0.75rem;
    font-size: 0.75rem;
    margin: 0;
    border-radius: var(--radius);
    font-weight: 600;
    min-width: 55px;
    max-width: 70px;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, var(--error), #dc2626);
    color: white;
    border: none;
    cursor: pointer;
    flex-shrink: 0;
    box-shadow: var(--shadow-sm);
}

td button:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

td form {
    display: contents;
    margin: 0;
}

/* ===== FORM STYLES ===== */

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 700;
    color: var(--gray-800);
    font-size: 0.875rem;
}

.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    transition: all 0.3s ease;
    background: white;
    color: var(--gray-800);
}

.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--primary-500);
    background: white;
    box-shadow: 0 0 0 3px var(--primary-100);
    transform: translateY(-1px);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.form-row-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

/* ===== BUTTONS ===== */

button {
    width: 100%;
    padding: 0.875rem 1.5rem;
    background: linear-gradient(135deg, var(--primary-500), var(--primary-600));
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 1rem;
    box-shadow: var(--shadow-md);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

button:active {
    transform: translateY(0);
}

/* ===== MESSAGES ===== */

.error {
    background: linear-gradient(135deg, #fef2f2, #fee2e2);
    color: var(--error);
    padding: 1rem;
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
    border: 1px solid #fecaca;
    font-weight: 600;
}

.success {
    background: linear-gradient(135deg, #f0fdf4, #dcfce7);
    color: var(--success);
    padding: 1rem;
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
    border: 1px solid #bbf7d0;
    font-weight: 600;
}

.login-info {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 2px solid var(--gray-200);
    font-size: 0.875rem;
    color: var(--gray-600);
}

.login-info h4 {
    color: var(--primary-700);
    margin-bottom: 0.75rem;
    font-weight: 700;
}

/* ===== RESPONSIVE DESIGN ===== */

/* Mobile First - Optimized Login */
@media screen and (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    
    .login-container {
        padding: 0 !important;
        min-height: 100vh !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    .login-box {
        padding: 1.5rem !important;
        width: 100% !important;
        height: auto !important;
        max-height: 100vh !important;
        margin: 0 !important;
        border-radius: 0 !important;
        overflow-y: auto !important;
    }
    
    .login-logo img {
        height: 50px !important;
    }
    
    .login-box h2 {
        font-size: 1.4rem !important;
        margin-bottom: 0.8rem !important;
    }
    
    .motivational-quote {
        padding: 0.6rem !important;
        margin-bottom: 1rem !important;
    }
    
    .motivational-quote p {
        font-size: 0.75rem !important;
    }
    
    .form-group {
        margin-bottom: 1rem !important;
    }
    
    .form-group label {
        font-size: 0.9rem !important;
        margin-bottom: 0.4rem !important;
    }
    
    .form-group input, .form-group select, .form-group textarea {
        padding: 0.8rem !important;
        font-size: 0.9rem !important;
        min-height: 40px !important;
    }
    
    button {
        padding: 0.9rem !important;
        font-size: 1rem !important;
        min-height: 45px !important;
        margin-top: 1rem !important;
    }
    
    .login-info {
        margin-top: 1rem !important;
        padding-top: 0.6rem !important;
    }
    
    .login-info h4 {
        font-size: 0.9rem !important;
    }
    
    .login-info p {
        font-size: 0.75rem !important;
    }
    
    /* Layout adjustments */
    .form-row, .form-row-4 {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .summary-cards {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .progress-cards {
        grid-template-columns: 1fr;
    }
    
    .nav ul {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
        padding: 1rem;
    }
    
    .header-left {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .logo {
        height: 50px;
    }
    
    .card {
        padding: 1.5rem;
    }
    
    /* Table mobile */
    .table-container {
        margin: 0 -1rem;
        border-radius: 0;
    }
    
    table {
        min-width: 700px;
        font-size: 0.8rem;
    }
    
    th, td {
        padding: 0.75rem 0.5rem;
    }
    
    th {
        font-size: 0.7rem;
    }
    
    .status {
        font-size: 0.65rem;
        padding: 0.25rem 0.5rem;
        min-width: 60px;
    }
    
    .action-container {
        gap: 0.3rem;
    }
    
    td select {
        font-size: 0.7rem;
        padding: 0.4rem 0.5rem;
        min-width: 80px;
        max-width: 90px;
    }
    
    td button {
        font-size: 0.65rem;
        padding: 0.4rem 0.5rem;
        min-width: 40px;
        max-width: 50px;
    }
}

@media (max-width: 480px) {
    .summary-cards {
        grid-template-columns: 1fr;
    }
    
    .summary-card .number {
        font-size: 2rem;
    }
    
    table {
        min-width: 600px;
        font-size: 0.75rem;
    }
    
    th, td {
        padding: 0.5rem 0.3rem;
    }
    
    .status {
        font-size: 0.6rem;
        padding: 0.2rem 0.4rem;
        min-width: 50px;
    }
    
    td select {
        font-size: 0.65rem;
        padding: 0.3rem 0.4rem;
        min-width: 70px;
        max-width: 80px;
    }
    
    td button {
        font-size: 0.6rem;
        padding: 0.3rem 0.4rem;
        min-width: 35px;
        max-width: 45px;
    }
}

/* ===== ANIMATIONS ===== */

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.card, .summary-card, .progress-card {
    animation: fadeIn 0.6s ease-out;
}

/* ===== UTILITIES ===== */

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.font-medium { font-weight: 500; }

.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }

/* ===== MODERN ENHANCEMENTS ===== */

/* Loading States */
.loading {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid var(--primary-200);
    border-top: 2px solid var(--primary-500);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Skeleton Loading */
.skeleton {
    background: linear-gradient(90deg, var(--gray-200) 25%, var(--gray-100) 50%, var(--gray-200) 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Enhanced Hover Effects */
.card:hover {
    transform: translateY(-4px) scale(1.01);
    box-shadow: var(--shadow-xl);
}

.summary-card:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: var(--shadow-xl);
}

/* Smooth Focus States */
input:focus, select:focus, textarea:focus, button:focus {
    outline: 2px solid var(--primary-500);
    outline-offset: 2px;
}

/* Modern Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--gray-100);
    border-radius: var(--radius);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-300);
    border-radius: var(--radius);
    transition: background var(--transition-normal);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-500);
}

/* Enhanced Table Interactions */
tr {
    transition: all var(--transition-fast);
}

tr:hover {
    background: var(--primary-50);
    transform: scale(1.005);
}

/* Modern Status Badges with Icons */
.status::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 6px;
    background: currentColor;
    opacity: 0.8;
}

/* Improved Button States */
button {
    position: relative;
    overflow: hidden;
}

button::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 var(--transition-slow);
}

button:hover::before {
    left: 100%;
}

/* Enhanced Form Validation */
.form-group.error input,
.form-group.error select,
.form-group.error textarea {
    border-color: var(--error);
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.form-group.success input,
.form-group.success select,
.form-group.success textarea {
    border-color: var(--success);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

/* Modern Tooltips */
[data-tooltip] {
    position: relative;
    cursor: help;
}

[data-tooltip]:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--gray-900);
    color: white;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius);
    font-size: 0.75rem;
    white-space: nowrap;
    z-index: var(--z-tooltip);
    animation: fadeIn var(--transition-fast);
}

/* Enhanced Mobile Optimizations */
@media (max-width: 768px) {
    /* Improved touch targets */
    button, .nav a, .logout-btn {
        min-height: 44px;
        min-width: 44px;
    }
    
    /* Better spacing for mobile */
    .container {
        padding: 0.75rem;
    }
    
    /* Optimized cards for mobile */
    .card, .summary-card {
        margin-bottom: 1rem;
        padding: 1.25rem;
    }
    
    /* Enhanced table mobile experience */
    .table-container {
        position: relative;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .table-container::after {
        content: '← Geser untuk melihat lebih banyak';
        position: absolute;
        bottom: 0.5rem;
        right: 0.5rem;
        font-size: 0.7rem;
        color: var(--gray-500);
        background: rgba(255,255,255,0.9);
        padding: 0.25rem 0.5rem;
        border-radius: var(--radius-sm);
        pointer-events: none;
    }
}

/* Dark mode support (future enhancement) */
@media (prefers-color-scheme: dark) {
    :root {
        --gray-50: #1e293b;
        --gray-100: #334155;
        --gray-200: #475569;
        --gray-800: #f1f5f9;
        --gray-900: #f8fafc;
    }
}

/* Print styles */
@media print {
    .nav, .logout-btn, button, .action-container {
        display: none !important;
    }
    
    .card, .summary-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid var(--gray-300);
    }
    
    body {
        background: white !important;
    }
}
/* ===== MOBILE TABLE IMPROVEMENTS ===== */

@media (max-width: 768px) {
    /* Better table mobile experience */
    .table-container {
        position: relative;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        border-radius: var(--radius-lg);
        margin: 0 -1rem;
    }
    
    .table-container::before {
        content: '← Geser untuk melihat semua kolom →';
        position: sticky;
        top: 0;
        left: 0;
        right: 0;
        background: var(--primary-500);
        color: white;
        text-align: center;
        padding: 0.5rem;
        font-size: 0.75rem;
        font-weight: 600;
        z-index: 10;
        border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    }
    
    table {
        min-width: 800px;
        font-size: 0.75rem;
    }
    
    th, td {
        padding: 0.5rem 0.25rem;
        white-space: nowrap;
    }
    
    th {
        font-size: 0.65rem;
        position: sticky;
        top: 40px;
    }
    
    /* Mobile action buttons */
    .action-container {
        display: flex;
        flex-direction: column;
        gap: 0.25rem;
        min-width: 120px;
    }
    
    .action-row {
        display: flex;
        gap: 0.25rem;
        align-items: center;
    }
    
    td select {
        font-size: 0.65rem;
        padding: 0.25rem 0.5rem;
        min-width: 80px;
        max-width: 90px;
        border-radius: var(--radius-sm);
    }
    
    td button {
        font-size: 0.65rem;
        padding: 0.25rem 0.5rem;
        min-width: 35px;
        max-width: 45px;
        border-radius: var(--radius-sm);
    }
    
    /* Status badges mobile */
    .status {
        font-size: 0.6rem;
        padding: 0.2rem 0.4rem;
        min-width: 50px;
    }
    
    /* Text truncation for mobile */
    td:nth-child(2), td:nth-child(3) {
        max-width: 120px;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}

@media (max-width: 480px) {
    .table-container {
        margin: 0 -0.75rem;
    }
    
    table {
        min-width: 700px;
        font-size: 0.7rem;
    }
    
    th, td {
        padding: 0.4rem 0.2rem;
    }
    
    th {
        font-size: 0.6rem;
    }
    
    .action-container {
        min-width: 100px;
    }
    
    td select {
        font-size: 0.6rem;
        padding: 0.2rem 0.4rem;
        min-width: 70px;
        max-width: 80px;
    }
    
    td button {
        font-size: 0.6rem;
        padding: 0.2rem 0.4rem;
        min-width: 30px;
        max-width: 40px;
    }
    
    .status {
        font-size: 0.55rem;
        padding: 0.15rem 0.3rem;
        min-width: 45px;
    }
    
    /* Smaller text truncation */
    td:nth-child(2), td:nth-child(3) {
        max-width: 100px;
    }
}

/* ===== MOBILE FORM IMPROVEMENTS ===== */

@media (max-width: 768px) {
    .form-row, .form-row-4 {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .form-group {
        margin-bottom: 1rem;
    }
    
    .form-group input, 
    .form-group select, 
    .form-group textarea {
        font-size: 16px; /* Prevents zoom on iOS */
        padding: 0.75rem;
    }
    
    button {
        font-size: 16px;
        padding: 0.875rem 1.5rem;
        min-height: 48px;
    }
}

/* ===== MOBILE NAVIGATION IMPROVEMENTS ===== */

@media (max-width: 768px) {
    .nav ul {
        display: flex;
        flex-wrap: wrap;
        gap: 0.25rem;
        justify-content: center;
    }
    
    .nav a {
        font-size: 0.75rem;
        padding: 0.5rem 0.75rem;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .nav ul {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .nav a {
        font-size: 0.875rem;
        padding: 0.75rem 1rem;
        width: 100%;
    }
}

/* ===== MOBILE CARD IMPROVEMENTS ===== */

@media (max-width: 768px) {
    .card {
        margin: 0 -1rem 1rem -1rem;
        border-radius: 0;
        padding: 1.5rem 1rem;
    }
    
    .card h3 {
        font-size: 1.125rem;
        margin-bottom: 1rem;
    }
}

@media (max-width: 480px) {
    .card {
        margin: 0 -0.75rem 1rem -0.75rem;
        padding: 1.25rem 0.75rem;
    }
    
    .card h3 {
        font-size: 1rem;
    }
}
/* ===== MOBILE NAVIGATION FIX ===== */

@media (max-width: 768px) {
    .nav {
        padding: 0.75rem 1rem;
    }
    
    .nav ul {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.5rem !important;
        justify-items: stretch !important;
    }
    
    .nav a {
        font-size: 0.75rem !important;
        padding: 0.75rem 0.5rem !important;
        min-height: 48px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        text-align: center !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }
}

@media (max-width: 480px) {
    .nav ul {
        grid-template-columns: 1fr !important;
        gap: 0.5rem !important;
    }
    
    .nav a {
        font-size: 0.875rem !important;
        padding: 0.875rem 1rem !important;
        min-height: 52px !important;
        width: 100% !important;
    }
}
/* ===== CONSISTENT MOBILE NAVIGATION ===== */

@media (max-width: 768px) {
    .nav ul {
        display: grid !important;
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 0.5rem !important;
        justify-items: stretch !important;
    }
    
    .nav a {
        font-size: 0.7rem !important;
        padding: 0.75rem 0.25rem !important;
        min-height: 48px !important;
        line-height: 1.2 !important;
    }
}

@media (max-width: 480px) {
    .nav ul {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    .nav a {
        font-size: 0.75rem !important;
        padding: 0.75rem 0.5rem !important;
    }
}

@media (max-width: 360px) {
    .nav ul {
        grid-template-columns: 1fr !important;
    }
    
    .nav a {
        font-size: 0.875rem !important;
        padding: 0.875rem 1rem !important;
    }
}
/* ===== FIX TABLE HEADER OVERLAP ===== */

@media (max-width: 768px) {
    .table-container::before {
        position: relative !important;
        top: auto !important;
        left: auto !important;
        right: auto !important;
    }
    
    th {
        position: relative !important;
        top: auto !important;
        z-index: 1 !important;
    }
    
    tbody tr:first-child td {
        padding-top: 0.75rem !important;
    }
}
/* ===== MOBILE TABLE RESPONSIVE FIX ===== */

@media (max-width: 768px) {
    /* Remove sticky positioning that causes overlap */
    .table-container::before {
        display: none !important;
    }
    
    th {
        position: static !important;
        top: auto !important;
    }
    
    /* Better table layout for mobile */
    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin: 0;
        border-radius: var(--radius-lg);
    }
    
    table {
        min-width: 100%;
        width: 100%;
        font-size: 0.8rem;
    }
    
    th, td {
        padding: 0.75rem 0.5rem;
        vertical-align: top;
    }
    
    /* Specific column widths for better mobile display */
    th:nth-child(1), td:nth-child(1) { width: 80px; min-width: 80px; }
    th:nth-child(2), td:nth-child(2) { width: auto; min-width: 150px; }
    th:nth-child(3), td:nth-child(3) { width: auto; min-width: 120px; }
    th:nth-child(4), td:nth-child(4) { width: 100px; min-width: 100px; }
    th:nth-child(5), td:nth-child(5) { width: 100px; min-width: 100px; }
    th:nth-child(6), td:nth-child(6) { width: 140px; min-width: 140px; }
    
    /* Better action container for mobile */
    .action-container {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
        width: 100%;
    }
    
    .action-row {
        display: flex;
        gap: 0.5rem;
        width: 100%;
    }
    
    td select {
        flex: 1;
        font-size: 0.75rem;
        padding: 0.5rem;
        min-width: 90px;
    }
    
    td button {
        flex-shrink: 0;
        font-size: 0.75rem;
        padding: 0.5rem 0.75rem;
        min-width: 60px;
    }
    
    /* Status badges */
    .status {
        font-size: 0.7rem;
        padding: 0.3rem 0.6rem;
        display: inline-block;
        min-width: 70px;
        text-align: center;
    }
    
    /* Text wrapping for long content */
    td:nth-child(2), td:nth-child(3) {
        word-wrap: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
        white-space: normal;
        max-width: 200px;
    }
}

@media (max-width: 480px) {
    table {
        font-size: 0.75rem;
    }
    
    th, td {
        padding: 0.5rem 0.25rem;
    }
    
    th:nth-child(1), td:nth-child(1) { width: 70px; min-width: 70px; }
    th:nth-child(6), td:nth-child(6) { width: 120px; min-width: 120px; }
    
    td select {
        font-size: 0.7rem;
        padding: 0.4rem;
        min-width: 80px;
    }
    
    td button {
        font-size: 0.7rem;
        padding: 0.4rem 0.6rem;
        min-width: 50px;
    }
    
    .status {
        font-size: 0.65rem;
        padding: 0.25rem 0.5rem;
        min-width: 60px;
    }
    
    td:nth-child(2), td:nth-child(3) {
        max-width: 150px;
    }
}