* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background-color: #f5f5f5;
}

/* Login Page */
.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
}

.login-box {
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header h1 {
    color: #1e3a8a;
    font-size: 24px;
    margin-bottom: 10px;
}

.login-header h2 {
    color: #3b82f6;
    font-size: 18px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #333;
    font-weight: bold;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
}

.btn-primary {
    width: 100%;
    padding: 12px;
    background-color: #1e3a8a;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn-primary:hover {
    background-color: #1e40af;
}

.error-message {
    color: #dc2626;
    margin-bottom: 15px;
    padding: 10px;
    background-color: #fee2e2;
    border-radius: 5px;
    display: none;
}

/* Header */
.main-header {
    background-color: #1e3a8a;
    color: white;
    text-align: center;
    padding: 30px 20px;
}

.main-header h1 {
    font-size: 28px;
    margin-bottom: 10px;
    font-weight: bold;
}

.main-header h2 {
    font-size: 22px;
    margin-bottom: 15px;
    font-weight: bold;
}

.datetime {
    font-size: 14px;
    opacity: 0.9;
}

/* Info Bar */
.info-bar {
    background-color: #e5e7eb;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.info-left, .info-right {
    display: flex;
    gap: 20px;
    align-items: center;
}

.info-bar span {
    color: #1f2937;
    font-weight: 500;
}

.time {
    font-weight: bold;
}

/* Navigation Buttons */
.nav-buttons {
    display: flex;
    gap: 20px;
    padding: 30px 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.nav-button {
    flex: 1;
    min-width: 250px;
    max-width: 350px;
    padding: 30px 20px;
    border-radius: 10px;
    text-align: center;
    color: white;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.nav-button:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.2);
}

.nav-button.green {
    background-color: #10b981;
}

.nav-button.cyan {
    background-color: #06b6d4;
}

.nav-button.red {
    background-color: #ef4444;
}

.nav-button.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.nav-button h3 {
    font-size: 24px;
    margin-bottom: 15px;
    font-weight: bold;
}

.nav-button p {
    font-size: 14px;
    opacity: 0.9;
}

/* Circular Navigation */
.circular-nav {
    display: flex;
    justify-content: center;
    gap: 40px;
    padding: 40px 20px;
    flex-wrap: wrap;
    background-color: white;
    position: relative;
    min-height: 300px;
}

.circle-icon {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.circle-icon:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 12px rgba(0,0,0,0.3);
}

.circle-icon.red {
    background-color: #ef4444;
}

.circle-icon.orange {
    background-color: #f97316;
}

.circle-icon.green {
    background-color: #10b981;
}

.circle-icon.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.circle-icon .icon {
    font-size: 48px;
    margin-bottom: 10px;
}

.circle-icon span {
    font-size: 16px;
    font-weight: bold;
}

/* History Section */
.history-section {
    text-align: center;
    padding: 30px 20px;
}

.btn-history, .btn-logout {
    padding: 12px 30px;
    margin: 0 10px;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn-history {
    background-color: #3b82f6;
    color: white;
}

.btn-history:hover {
    background-color: #2563eb;
}

.btn-logout {
    background-color: #ef4444;
    color: white;
}

.btn-logout:hover {
    background-color: #dc2626;
}

/* Footer */
.main-footer {
    background-color: #1f2937;
    color: white;
    text-align: center;
    padding: 30px 20px;
    margin-top: auto;
}

.main-footer p {
    margin: 5px 0;
    font-weight: bold;
}

/* Form Container */
.form-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    background-color: white;
    min-height: 100vh;
}

.form-header {
    text-align: center;
    padding: 20px 0;
    border-bottom: 2px solid #1e3a8a;
    margin-bottom: 20px;
}

.form-header h1 {
    color: #1e3a8a;
    font-size: 24px;
}

.instructions {
    background-color: #fef3c7;
    padding: 15px;
    border-left: 4px solid #f59e0b;
    margin-bottom: 30px;
}

.instructions p {
    margin: 5px 0;
    color: #92400e;
}

.form-section {
    margin-bottom: 30px;
    padding: 20px;
    background-color: #f9fafb;
    border-radius: 8px;
}

.form-section h2 {
    color: #1e3a8a;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #3b82f6;
}

.form-row {
    display: flex;
    margin-bottom: 20px;
    align-items: flex-start;
}

.form-row label {
    flex: 0 0 40%;
    font-weight: 500;
    color: #374151;
    padding-top: 10px;
}

.form-row input,
.form-row select,
.form-row textarea {
    flex: 1;
    padding: 10px;
    border: 1px solid #d1d5db;
    border-radius: 5px;
    font-size: 14px;
    font-family: inherit;
}

.form-row input[readonly] {
    background-color: #f3f4f6;
    color: #6b7280;
}

.form-row textarea {
    resize: vertical;
    min-height: 80px;
}

.form-actions {
    text-align: center;
    padding: 30px 0;
    border-top: 2px solid #e5e7eb;
    margin-top: 30px;
}

.btn-submit {
    padding: 15px 40px;
    background-color: #1e3a8a;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 18px;
    cursor: pointer;
    margin-right: 15px;
    transition: background-color 0.3s;
}

.btn-submit:hover {
    background-color: #1e40af;
}

.btn-cancel {
    padding: 15px 40px;
    background-color: #6b7280;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 18px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn-cancel:hover {
    background-color: #4b5563;
}

.form-message {
    text-align: center;
    padding: 15px;
    margin-top: 20px;
    border-radius: 5px;
    display: none;
}

.form-message.success {
    background-color: #d1fae5;
    color: #065f46;
    border: 1px solid #10b981;
}

.form-message.error {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #ef4444;
}

/* Field Error Styles */
.field-error-highlight {
    border: 2px solid #dc2626 !important;
    background-color: #fef2f2 !important;
}

.field-error-highlight:focus {
    outline: none;
    border-color: #dc2626 !important;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1) !important;
}

.field-error {
    color: #dc2626;
    font-size: 12px;
    margin-top: 4px;
    display: block;
}

/* History Page */
.history-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    background-color: #f5f5f5;
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 20px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.history-header > div {
    display: flex;
    gap: 10px;
}

.history-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    padding: 0 20px;
    border-bottom: 2px solid #e5e7eb;
    background-color: white;
    border-radius: 8px 8px 0 0;
    padding: 15px 20px;
}

.history-tab-btn {
    padding: 10px 20px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-size: 14px;
    color: #6b7280;
    transition: all 0.3s;
    font-weight: 500;
}

.history-tab-btn:hover {
    color: #1e3a8a;
    background-color: #f3f4f6;
}

.history-tab-btn.active {
    color: #1e3a8a;
    border-bottom-color: #1e3a8a;
    font-weight: bold;
}

.history-header h1 {
    color: #1e3a8a;
    font-size: 28px;
}

.btn-back {
    padding: 10px 20px;
    background-color: #3b82f6;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
}

.btn-back:hover {
    background-color: #2563eb;
}

.history-list {
    display: grid;
    gap: 20px;
}

.history-item {
    background-color: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: box-shadow 0.3s;
}

.history-item:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.history-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e5e7eb;
}

.history-item-title {
    font-size: 20px;
    color: #1e3a8a;
    font-weight: bold;
}

.history-item-date {
    color: #6b7280;
    font-size: 14px;
}

.history-item-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin-bottom: 15px;
}

.history-detail-item {
    display: flex;
    flex-direction: column;
}

.history-detail-label {
    font-size: 12px;
    color: #6b7280;
    margin-bottom: 5px;
    text-transform: uppercase;
}

.history-detail-value {
    font-size: 14px;
    color: #1f2937;
    font-weight: 500;
}

.history-item-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e5e7eb;
}

.btn-edit {
    padding: 8px 20px;
    background-color: #3b82f6;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}

.btn-edit:hover {
    background-color: #2563eb;
}

.loading {
    text-align: center;
    padding: 40px;
    color: #6b7280;
    font-size: 18px;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #6b7280;
}

.empty-state h2 {
    font-size: 24px;
    margin-bottom: 10px;
}

.empty-state p {
    font-size: 16px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-buttons {
        flex-direction: column;
    }
    
    .nav-button {
        max-width: 100%;
    }
    
    .circular-nav {
        gap: 20px;
    }
    
    .circle-icon {
        width: 120px;
        height: 120px;
    }
    
    .form-row {
        flex-direction: column;
    }
    
    .form-row label {
        margin-bottom: 8px;
        flex: 0 0 100%;
    }
    
    .form-row input,
    .form-row select,
    .form-row textarea {
        width: 100%;
        flex: 0 0 100%;
    }
    
    .form-container {
        padding: 10px;
    }
    
    .form-header-official {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    .form-header-left,
    .form-header-right {
        justify-content: center;
    }
    
    .form-title-main {
        font-size: 18px;
        padding: 15px 0;
    }
    
    .form-section {
        padding: 15px;
    }
    
    .form-section h2 {
        font-size: 18px;
    }
    
    .form-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .btn-submit,
    .btn-cancel,
    .btn-back {
        width: 100%;
        margin: 0;
    }
    
    .history-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .history-header > div {
        flex-direction: column;
        width: 100%;
    }
    
    .history-tabs {
        flex-wrap: wrap;
        padding: 10px;
    }
    
    .history-tab-btn {
        padding: 8px 15px;
        font-size: 12px;
    }
    
    .history-item-details {
        grid-template-columns: 1fr;
    }
    
    .main-header h1 {
        font-size: 20px;
    }
    
    .main-header h2 {
        font-size: 16px;
    }
    
    .info-bar {
        flex-direction: column;
        gap: 10px;
    }
    
    .admin-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .admin-tabs {
        flex-wrap: wrap;
    }
    
    .tab-btn {
        padding: 10px 15px;
        font-size: 14px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .charts-container {
        grid-template-columns: 1fr;
    }
    
    .search-section {
        flex-direction: column;
    }
    
    .search-input,
    .btn-search,
    .btn-export {
        width: 100%;
    }
}
