/* KPS UNITED BRAND COLORS */
:root {
    --kps-red: #D84315;
    --kps-navy: #1A3A52;
    --kps-yellow: #FDB813;
    --kps-green: #2E7D60;
    --kps-cream: #F5E6D3;
    --kps-blue: #1A3A52;
    /* Alias for navy */
}

/* Utility Classes */
.text-kps-blue {
    color: var(--kps-blue);
}

.text-green {
    color: green;
}

.text-orange {
    color: orange;
}

.font-bold {
    font-weight: bold;
}

.mt-2 {
    margin-top: 0.5rem;
}

.mt-4 {
    margin-top: 1rem;
}

.btn-sm {
    padding: 0.3rem 0.8rem;
    font-size: 0.9rem;
}

.btn-danger-custom {
    background-color: #dc3545;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    cursor: pointer;
    margin-right: auto;
}


* {
    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;

    /* Fade-in Logic */
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

body.loaded {
    opacity: 1;
}

.fade-in {
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

body.loaded .fade-in {
    opacity: 1;
}

/* Header & Navigation */
header {
    background: linear-gradient(135deg, var(--kps-red) 0%, var(--kps-navy) 100%);
    color: white;
    padding: 1.5rem 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

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

.header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.header-logo {
    height: 180px;
    width: auto;
}

.header-left h1,
.header-content h1 {
    font-size: 2rem;
    margin-bottom: 0.3rem;
}

.header-left .welcome {
    font-size: 1rem;
    opacity: 0.9;
}

.logout-btn {
    padding: 0.6rem 1.2rem;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid white;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s;
}

.logout-btn:hover {
    background: white;
    color: var(--kps-red);
}

nav {
    background: white;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    max-width: 1200px;
    margin: 0 auto;
}

nav a {
    display: block;
    padding: 1rem 1.5rem;
    text-decoration: none;
    color: var(--kps-navy);
    font-weight: 600;
    transition: all 0.3s;
}

nav a:hover {
    background: var(--kps-red);
    color: white;
}

/* Layout */
.container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 20px;
}

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

.section h2 {
    color: var(--kps-navy);
    margin-bottom: 1.5rem;
    font-size: 2rem;
    border-bottom: 3px solid var(--kps-red);
    padding-bottom: 0.5rem;
}

footer {
    background: var(--kps-navy);
    color: white;
    text-align: center;
    padding: 2rem;
    margin-top: 3rem;
}

/* Dashboard Specifics */
.price-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.price-table th,
.price-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.price-table th {
    background: var(--kps-red);
    color: white;
    font-weight: 600;
}

.price-table tr:hover {
    background: #f8f9ff;
}

.doc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.doc-card {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    padding: 1.5rem;
    border-radius: 8px;
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
    border: 2px solid transparent;
}

.doc-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(216, 67, 21, 0.3);
    border-color: var(--kps-red);
}

.doc-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.doc-card h3 {
    color: var(--kps-navy);
    margin-bottom: 0.5rem;
}

.article {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #eee;
}

.article:last-child {
    border-bottom: none;
}

.article h3 {
    color: var(--kps-red);
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
}

.article-meta {
    color: #999;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.welcome-section {
    background: linear-gradient(135deg, var(--kps-red) 0%, var(--kps-navy) 100%);
    color: white;
    padding: 2.5rem 2rem;
    text-align: center;
    border-radius: 10px;
}

.welcome-section h2 {
    color: white;
    border: none;
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.chart-container {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    margin-top: 1.5rem;
}

/* Resources Page Specifics */
.resource-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.resource-card {
    background: linear-gradient(135deg, #f5f7fa, #c3cfe2);
    padding: 1.5rem;
    border-radius: 10px;
    text-align: center;
    cursor: pointer;
    border: 2px solid transparent;
}

.resource-card:hover {
    border-color: var(--kps-red);
    transform: translateY(-5px);
}

/* Profile Page Specifics */
.profile-avatar {
    width: 120px;
    height: 120px;
    background: linear-gradient(135deg, var(--kps-red), var(--kps-navy));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: white;
    margin: 0 auto 1rem;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--kps-navy);
    font-weight: 600;
}

.form-group input {
    width: 100%;
    padding: 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1rem;
}

.form-group input:focus {
    outline: none;
    border-color: var(--kps-red);
}

.btn {
    padding: 1rem 2rem;
    background: var(--kps-red);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
}

/* Responsive */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
    }

    .header-left {
        flex-direction: column;
        text-align: center;
    }

    .doc-grid,
    .resource-grid {
        grid-template-columns: 1fr;
    }
}

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

.modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 0;
    border: 1px solid #888;
    width: 90%;
    max-width: 900px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    animation: slideIn 0.3s;
}

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

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.modal-header {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid #eee;
}

.modal-header h2 {
    margin: 0;
    color: #555;
    font-weight: 400;
    font-size: 1.8rem;
}

.modal-body {
    padding: 2rem;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #666;
    font-size: 0.9rem;
}

.form-group input:not([type="checkbox"]):not([type="radio"]),
.form-group select {
    width: 100%;
    padding: 0.8rem;
    border: none;
    border-bottom: 1px solid #ccc;
    background: #f9f9f9;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input[type="checkbox"],
.form-group input[type="radio"] {
    width: auto;
    display: inline-block;
    margin-right: 0.5rem;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-bottom-color: var(--kps-blue);
    background: #fff;
}

.full-width {
    grid-column: 1 / -1;
}

.radio-group {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    margin-top: 0.5rem;
}

.radio-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
    cursor: pointer;
}

.modal-footer {
    padding: 1.5rem 2rem;
    border-top: 1px solid #eee;
    display: flex;
    gap: 1rem;
}

.btn-save {
    background-color: #00bcd4;
    /* Teal color from image */
    color: white;
    border: none;
    padding: 0.8rem 2rem;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    text-transform: uppercase;
}

.btn-cancel {
    background-color: #2c3e50;
    /* Dark color from image */
    color: white;
    border: none;
    padding: 0.8rem 2rem;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    text-transform: uppercase;
}

.required-icon {
    color: #ff5722;
    /* Orange icon color */
    float: right;
    font-size: 1.2rem;
}