* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background-color: #f4f4f4;
    line-height: 1.6;
}

/* Login Styles */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-box {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    width: 100%;
    max-width: 400px;
}

.login-box h2 {
    text-align: center;
    margin-bottom: 1.5rem;
    color: #333;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
    color: #555;
}

.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

button {
    width: 100%;
    padding: 0.75rem;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.3s;
}

button:hover {
    background: #5a6fd8;
}

.error {
    background: #f8d7da;
    color: #721c24;
    padding: 0.75rem;
    border-radius: 5px;
    margin-bottom: 1rem;
    border: 1px solid #f5c6cb;
}

.success {
    background: #d4edda;
    color: #155724;
    padding: 0.75rem;
    border-radius: 5px;
    margin-bottom: 1rem;
    border: 1px solid #c3e6cb;
}

.login-info {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
    font-size: 0.9rem;
    color: #666;
}

/* Header Styles */
.header {
    background: white;
    padding: 1rem;
    margin-bottom: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo {
    height: 60px;
    width: auto;
}

.header-title {
    display: flex;
    flex-direction: column;
}

.header h1 {
    color: #333;
    margin: 0;
    font-size: 1.5rem;
}

.header .subtitle {
    color: #666;
    font-size: 0.9rem;
    margin: 0;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logout-btn {
    background: #dc3545;
    color: white;
    padding: 0.5rem 1rem;
    text-decoration: none;
    border-radius: 5px;
    transition: background 0.3s;
}

.logout-btn:hover {
    background: #c82333;
}

/* Navigation */
.nav {
    background: white;
    padding: 1rem;
    margin-bottom: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.nav ul {
    list-style: none;
    display: flex;
    gap: 2rem;
}

.nav a {
    text-decoration: none;
    color: #667eea;
    font-weight: bold;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    transition: all 0.3s;
}

.nav a:hover, .nav a.active {
    background: #667eea;
    color: white;
}

/* Cards */
.card {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    margin-bottom: 2rem;
    border: 1px solid #e9ecef;
}

.card h3 {
    margin-bottom: 1.5rem;
    color: #2c3e50;
    font-size: 1.4rem;
    font-weight: 600;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 0.5rem;
}

/* Summary Cards */
.summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.summary-card {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    text-align: center;
}

.summary-card h4 {
    color: #666;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.summary-card .number {
    font-size: 2rem;
    font-weight: bold;
    color: #333;
}

.summary-card.total { border-left: 4px solid #007bff; }
.summary-card.selesai { border-left: 4px solid #28a745; }
.summary-card.proses { border-left: 4px solid #ffc107; }
.summary-card.belum { border-left: 4px solid #dc3545; }

/* Progress Cards */
.progress-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.progress-card {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.progress-card h4 {
    margin-bottom: 1rem;
    color: #333;
}

.progress-stats {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.progress-stats span {
    font-size: 0.9rem;
    color: #666;
}

.progress-bar {
    width: 100%;
    height: 10px;
    background: #e9ecef;
    border-radius: 5px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: #28a745;
    transition: width 0.3s;
}

/* Table */
.table-container {
    overflow-x: auto;
    border-radius: 10px;
    border: 1px solid #e9ecef;
    margin-top: 1rem;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    min-width: 800px; /* Minimum width untuk scroll horizontal */
}

th, td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
    vertical-align: middle;
}

th {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    font-weight: 600;
    color: #2c3e50;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

/* Specific column widths */
th:nth-child(1), td:nth-child(1) { width: 100px; } /* Tanggal */
th:nth-child(2), td:nth-child(2) { width: 80px; }  /* Jam */
th:nth-child(3), td:nth-child(3) { width: 300px; } /* Nama Kegiatan */
th:nth-child(4), td:nth-child(4) { width: 150px; } /* Lokasi */
th:nth-child(5), td:nth-child(5) { width: 150px; } /* Penanggung Jawab */
th:nth-child(6), td:nth-child(6) { width: 100px; } /* Status */
th:nth-child(7), td:nth-child(7) { width: 120px; } /* Aksi */

/* Text wrapping for long content */
td:nth-child(3) { /* Nama Kegiatan */
    word-wrap: break-word;
    max-width: 300px;
}

td:nth-child(4) { /* Lokasi */
    word-wrap: break-word;
    max-width: 150px;
}

tr:hover {
    background: #f8f9fa;
}

tr:last-child td {
    border-bottom: none;
}

/* Action Select in Table */
td select {
    padding: 0.5rem;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    font-size: 0.85rem;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 100px;
}

td select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.1);
}

td select:hover {
    border-color: #667eea;
}

/* Status Badges */
.status {
    padding: 0.4rem 1rem;
    border-radius: 25px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-block;
    min-width: 80px;
    text-align: center;
}

.status.belum {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a52 100%);
    color: white;
}

.status.sedang, .status.sedang-proses {
    background: linear-gradient(135deg, #feca57 0%, #ff9ff3 100%);
    color: #2c3e50;
}

.status.selesai {
    background: linear-gradient(135deg, #48dbfb 0%, #0abde3 100%);
    color: white;
}

/* Form Styles */
.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 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;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #2c3e50;
    font-size: 0.95rem;
}

.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 0.875rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

button {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 1rem;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

/* Responsive */
@media (max-width: 768px) {
    .form-row, .form-row-4 {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .summary-cards {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .progress-cards {
        grid-template-columns: 1fr;
    }
    
    .nav ul {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .header-left {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .logo {
        height: 50px;
    }
    
    .card {
        padding: 1.5rem;
    }
    
    th, td {
        padding: 0.75rem 0.5rem;
        font-size: 0.9rem;
    }
    
    .status {
        font-size: 0.7rem;
        padding: 0.3rem 0.8rem;
        min-width: 70px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0.5rem;
    }
    
    .summary-cards {
        grid-template-columns: 1fr;
    }
    
    .form-row-4 {
        grid-template-columns: 1fr;
    }
    
    .header {
        padding: 1rem;
    }
    
    .card {
        padding: 1rem;
    }
}

/* Dashboard Styles */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
}

/* Login Logo */
.login-logo {
    text-align: center;
    margin-bottom: 1.5rem;
}

.login-logo img {
    height: 80px;
    width: auto;
}

/* Motivational Quote */
.motivational-quote {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    border-left: 4px solid #28a745;
}

.motivational-quote p {
    margin: 0;
    color: #495057;
    font-size: 0.95rem;
    line-height: 1.4;
    text-align: center;
}

.motivational-quote em {
    font-style: italic;
    color: #28a745;
}