* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #2563eb;
    --secondary: #1e40af;
    --success: #10b981;
    --danger: #ef4444;
    --dark: #1f2937;
    --light: #f3f4f6;
    --white: #ffffff;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--light);
}

.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #0a1f44, #1a3a6e);
    padding: 2rem;
}

.login-box {
    background: var(--white);
    padding: 3rem;
    border-radius: 15px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 450px;
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-logo {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin-bottom: 1rem;
    object-fit: cover;
}

.login-box h1 {
    color: #0a1f44;
    margin-bottom: 0.5rem;
    font-size: 1.8rem;
}

.login-header p {
    color: #6c757d;
    font-size: 0.95rem;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    color: var(--dark);
    font-weight: 600;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper input {
    width: 100%;
    padding: 1rem;
    padding-right: 3rem;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s;
}

.input-wrapper input:focus {
    outline: none;
    border-color: #0a1f44;
    box-shadow: 0 0 0 3px rgba(10, 31, 68, 0.1);
}

.toggle-password,
.toggle-visibility {
    position: absolute;
    right: 1rem;
    background: none;
    border: none;
    color: #6c757d;
    cursor: pointer;
    font-size: 1.1rem;
    transition: color 0.3s;
}

.toggle-password:hover,
.toggle-visibility:hover {
    color: #0a1f44;
}

.login-btn {
    width: 100%;
    padding: 1rem;
    background: #0a1f44;
    color: var(--white);
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.login-btn:hover {
    background: #1a3a6e;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(10, 31, 68, 0.3);
}

.login-footer {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px solid #e1e8ed;
    text-align: center;
}

.login-footer p {
    color: #6c757d;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.credentials-info {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.credentials-info span {
    color: #0a1f44;
    font-size: 0.9rem;
}

.error {
    color: var(--danger);
    background: #fee;
    padding: 0.75rem;
    border-radius: 8px;
    text-align: center;
    margin-top: 1rem;
    display: none;
}

.dashboard {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 260px;
    background: #0a1f44;
    color: var(--white);
    padding: 2rem 0;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}

.sidebar .logo {
    padding: 0 1.5rem 2rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    margin-bottom: 1rem;
}

.sidebar .logo h2 {
    color: var(--white);
    font-size: 1.2rem;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
}

.nav-item {
    padding: 1rem 1.5rem;
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.3s;
    font-size: 0.95rem;
    border-left: 3px solid transparent;
}

.nav-item:hover,
.nav-item.active {
    background: rgba(255,255,255,0.1);
    color: var(--white);
    border-left-color: white;
}

.main-content {
    flex: 1;
    padding: 2rem;
    background: #f3f4f6;
    overflow-y: auto;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    background: white;
    padding: 1.5rem 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.dashboard-header h1 {
    color: #0a1f44;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.section {
    display: none;
    background: var(--white);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.section.active {
    display: block;
}

.section h2 {
    color: #0a1f44;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e1e8ed;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    color: var(--dark);
    font-weight: 600;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.85rem 1rem;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #0a1f44;
}

.form-group small {
    color: #666;
    font-size: 0.85rem;
    display: block;
    margin-top: 0.5rem;
}

.content-form {
    max-width: 650px;
}

.save-btn {
    padding: 0.85rem 2rem;
    background: #0a1f44;
    color: var(--white);
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.save-btn:hover {
    background: #1a3a6e;
    transform: translateY(-2px);
}

.add-btn {
    padding: 0.85rem 1.5rem;
    background: #0a1f44;
    color: var(--white);
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.add-btn:hover {
    background: #1a3a6e;
}

.items-list {
    display: grid;
    gap: 1rem;
}

.item-card {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid #e1e8ed;
}

.item-card h3 {
    color: #0a1f44;
    margin-bottom: 0.5rem;
}

.item-card p {
    color: #6c757d;
    font-size: 0.9rem;
}

.item-card small {
    color: #0a1f44;
    font-weight: 600;
    font-size: 0.85rem;
}

.item-actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

.edit-btn,
.delete-btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

.edit-btn {
    background: #0a1f44;
    color: var(--white);
}

.delete-btn {
    background: var(--danger);
    color: var(--white);
}

.edit-btn:hover { background: #1a3a6e; }
.delete-btn:hover { opacity: 0.85; }

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
}

.modal-content {
    background: var(--white);
    margin: 5% auto;
    padding: 2rem;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    max-height: 85vh;
    overflow-y: auto;
}

.close {
    float: right;
    font-size: 2rem;
    cursor: pointer;
    color: var(--dark);
    line-height: 1;
}

.close:hover { color: var(--danger); }

.success-message {
    background: #10b981;
    color: var(--white);
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    text-align: center;
    font-weight: 600;
}

.affair-category {
    display: inline-block;
    background: #0a1f44;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    margin-bottom: 0.5rem;
}

.banner-tabs,
.affairs-tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.banner-tab,
.affairs-tab {
    padding: 0.75rem 2rem;
    background: var(--light);
    border: 2px solid var(--light);
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

.banner-tab:hover,
.affairs-tab:hover {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

.banner-tab.active,
.affairs-tab.active {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

@media (max-width: 768px) {
    .dashboard {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
    }
}
