/* Reset dan Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f4f4f4;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
header {
    background: #2c3e50;
    color: white;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.dh{
    background: #2c3e50;
    color: white;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    text-align: center;
    gap: 15px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

/* Navigation */
.main-nav {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 20px;
    background: #3498db;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    border: none;
    cursor: pointer;
    transition: background 0.3s;
    text-align: center;
    font-size: 14px;
}

.btn:hover {
    background: #2980b9;
    transform: translateY(-1px);
}

.btn-primary {
    background: #e74c3c;
}

.btn-primary:hover {
    background: #c0392b;
}

.btn-secondary {
    background: #95a5a6;
}

.btn-secondary:hover {
    background: #7f8c8d;
}

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

/* Calendar */
.calendar-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
}

.calendar-controls h2 {
    color: #2c3e50;
    margin: 0;
}

.calendar {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overflow: hidden;
}

.calendar-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background: #34495e;
    color: white;
}

.day-header {
    padding: 15px;
    text-align: center;
    font-weight: bold;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background: #ecf0f1;
}

.calendar-day {
    min-height: 120px;
    background: white;
    padding: 8px;
    border: 1px solid #ecf0f1;
    position: relative;
}

.calendar-day.empty {
    background: #f8f9fa;
}

.calendar-day.today {
    background: #e8f4fd;
}

.day-number {
    font-weight: bold;
    margin-bottom: 5px;
    color: #2c3e50;
    font-size: 14px;
}

.kegiatan-item {
    background: #e74c3c;
    color: white;
    padding: 4px 8px;
    margin: 2px 0;
    border-radius: 3px;
    font-size: 0.8em;
    cursor: pointer;
    transition: background 0.3s;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.kegiatan-item:hover {
    background: #c0392b;
    transform: scale(1.02);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    animation: fadeIn 0.3s;
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 30px;
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    position: relative;
    animation: slideIn 0.3s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.close {
    position: absolute;
    right: 15px;
    top: 10px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    color: #7f8c8d;
}

.close:hover {
    color: #34495e;
}

/* Login Page */
.login-body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-container {
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    width: 100%;
    max-width: 400px;
    margin: 20px;
}

.login-form h2 {
    text-align: center;
    margin-bottom: 30px;
    color: #2c3e50;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #2c3e50;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 5px rgba(52, 152, 219, 0.3);
}

/* Form Container */
.form-container {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.kegiatan-form {
    max-width: 600px;
    margin: 0 auto;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

/* Alert */
.alert {
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    font-weight: bold;
}

.alert.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Table Styles */
.table-container {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.data-table th,
.data-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ecf0f1;
}

.data-table th {
    background: #34495e;
    color: white;
    font-weight: bold;
}

.data-table tr:hover {
    background: #f8f9fa;
}

/* Action buttons in table */
.action-buttons {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .calendar-header,
    .calendar-grid {
        grid-template-columns: repeat(7, 1fr);
    }
    
    .calendar-day {
        min-height: 80px;
        font-size: 0.8em;
    }
    
    .kegiatan-item {
        font-size: 0.7em;
        padding: 2px 4px;
    }
    
    .calendar-controls {
        flex-direction: column;
        text-align: center;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .user-info {
        justify-content: center;
    }
    
    .main-nav {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .calendar-header,
    .calendar-grid {
        grid-template-columns: repeat(7, 1fr);
    }
    
    .day-header {
        padding: 8px 4px;
        font-size: 0.8em;
    }
    
    .calendar-day {
        min-height: 60px;
        padding: 4px;
    }
    
    .login-container {
        padding: 20px;
        margin: 10px;
    }
    
    .modal-content {
        padding: 20px;
        margin: 10% auto;
    }
    
    .action-buttons {
        flex-direction: column;
    }
}

/* Print Styles */
@media print {
    .main-nav,
    .calendar-controls .btn,
    .user-info .btn {
        display: none;
    }
    
    .calendar {
        box-shadow: none;
        border: 1px solid #ccc;
    }
}

/* Tambahkan di file css/style.css */

.text-muted {
    color: #6c757d !important;
}

.confirmation-box {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.kegiatan-info, .panitia-info {
    background: white;
    padding: 15px;
    border-radius: 5px;
    margin: 15px 0;
    border-left: 4px solid #3498db;
}

.warning {
    background: #fff3cd;
    color: #856404;
    padding: 10px;
    border-radius: 5px;
    border: 1px solid #ffeaa7;
}

.confirmation-box .form-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: normal;
}

.confirmation-box .form-group input[type="radio"] {
    margin-right: 10px;
}

/* Style untuk table action buttons */
.action-buttons {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    .action-buttons {
        flex-direction: column;
    }
    
    .action-buttons .btn {
        margin-bottom: 5px;
    }
}

/* User Management Styles */
.user-form small {
    display: block;
    margin-top: 5px;
    color: #6c757d;
    font-size: 0.8em;
}

.stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.stat-card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    text-align: center;
}

.stat-number {
    font-size: 2em;
    font-weight: bold;
    color: #3498db;
}

.stat-label {
    color: #7f8c8d;
    font-size: 0.9em;
}

.role-badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8em;
    font-weight: bold;
}

.role-guru {
    background: #d4edda;
    color: #155724;
}

.role-pegawai {
    background: #cce7ff;
    color: #004085;
}

.role-admin {
    background: #f8d7da;
    color: #721c24;
}

.password-strength {
    margin-top: 5px;
    font-size: 0.8em;
}

.strength-weak { color: #dc3545; }
.strength-medium { color: #ffc107; }
.strength-strong { color: #28a745; }


/* Calendar Weekend Styles */
.calendar-day.weekend {
    background-color: #f8f9fa;
}

.calendar-day.weekend .day-number {
    color: #e74c3c;
}

/* Search Results Styles */
.search-container {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.search-form {
    display: flex;
    gap: 10px;
    align-items: end;
    flex-wrap: wrap;
}

.search-form .form-group {
    margin-bottom: 0;
    flex: 1;
    min-width: 200px;
}

.search-results {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.search-result-item {
    border-left: 4px solid #3498db;
    padding: 15px;
    margin-bottom: 10px;
    background: #f8f9fa;
    transition: transform 0.2s ease;
}

.search-result-item:hover {
    transform: translateX(5px);
}

.search-result-item h4 {
    margin: 0 0 10px 0;
    color: #2c3e50;
}

.search-result-meta {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    font-size: 0.9em;
    color: #6c757d;
}

.no-results {
    text-align: center;
    padding: 20px;
    color: #6c757d;
    font-style: italic;
}

.today-btn {
    background: #27ae60 !important;
}

.today-btn:hover {
    background: #219a52 !important;
}

/* Highlight searched date in calendar */
.calendar-day.searched {
    background-color: #fff3cd !important;
    border: 2px solid #ffc107 !important;
}

/* Responsive search form */
@media (max-width: 768px) {
    .search-form {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-form .form-group {
        min-width: auto;
    }
    
    .search-result-meta {
        flex-direction: column;
        gap: 5px;
    }
}

/* Header Styles */
.main-header {
    background: linear-gradient(135deg, #2c3e50 0%, #3498db 100%);
    color: white;
    padding: 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header-top {
    background: rgba(0,0,0,0.1);
    padding: 10px 0;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo {
    width: 60px;
    height: 60px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: #2c3e50;
    border: 3px solid #3498db;
}

.logo-text {
    text-align: left;
}

.logo-text h1 {
    margin: 0;
    font-size: 1.5em;
    font-weight: 700;
}

.logo-text .school-name {
    margin: 0;
    font-size: 0.9em;
    opacity: 0.9;
    font-weight: 500;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

/* Footer Styles */
.main-footer {
    background: #2c3e50;
    color: white;
    text-align: center;
    padding: 20px;
    margin-top: 40px;
    border-top: 4px solid #3498db;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.footer-text {
    margin: 0;
    font-size: 0.9em;
    opacity: 0.8;
}

/* Update container untuk accommodate header */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    min-height: calc(100vh - 200px); /* Adjust based on header/footer height */
}

/* Update header di dalam container */
.container > header {
    margin-bottom: 20px;
}

/* Responsive Header */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .logo-section {
        justify-content: center;
    }
    
    .logo-text {
        text-align: center;
    }
    
    .header-actions {
        justify-content: center;
    }
    
    .logo {
        width: 50px;
        height: 50px;
        font-size: 0.9em;
    }
    
    .logo-text h1 {
        font-size: 1.3em;
    }
    
    .logo-text .school-name {
        font-size: 0.8em;
    }
}

@media (max-width: 480px) {
    .header-content {
        padding: 0 15px;
    }
    
    .logo {
        width: 45px;
        height: 45px;
    }
    
    .logo-text h1 {
        font-size: 1.1em;
    }
}