:root {
    --primary-color: #5597A9; /* Teal from palette */
    --primary-dark: #3D6D7A;
    --primary-light: #B2E2F2; /* Light Blue from palette */
    --secondary-color: #555555; /* Dark Gray from palette */
    --accent-color: #FF7F27; /* Orange from palette */
    --light-bg: #F2F2F2; /* Light Gray from palette */
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --light-color: var(--light-bg);
    --dark-color: var(--secondary-color);
    --white: #ffffff;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);
    --radius-sm: 4px;
    --radius-md: 10px;
    --radius-lg: 20px;
    --transition: all 0.3s ease;
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: linear-gradient(135deg, var(--light-bg) 0%, var(--primary-light) 100%);
    background-attachment: fixed;
    color: var(--dark-color);
    margin: 0;
    padding: 0;
    line-height: 1.6;
}

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

/* Header & Logo */
.header-brand {
    text-align: center;
    margin-bottom: 30px;
}

.header-brand img {
    max-height: 100px;
    width: auto;
    transition: var(--transition);
    object-fit: contain;
}

.header-brand img:hover {
    transform: scale(1.05);
}

/* Navigation */
.nav {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    padding: 15px 30px;
    box-shadow: var(--shadow-md);
    display: flex;
    justify-content: center;
    gap: 30px;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav a {
    text-decoration: none;
    color: var(--dark-color);
    font-weight: 600;
    font-size: 0.95rem;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 15px;
    border-radius: var(--radius-sm);
}

.nav a:hover {
    color: var(--primary-color);
    background: var(--primary-light);
}

/* Cards */
.card {
    background: var(--white);
    padding: 40px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    border-top: 5px solid var(--primary-color);
    animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

h1, h2, h3 {
    color: var(--primary-dark);
    font-weight: 700;
}

h1 { font-size: 2.2rem; margin-bottom: 1rem; }

/* Forms */
.form-group {
    margin-bottom: 25px;
}

label {
    display: block;
    font-weight: 600;
    margin-bottom: 10px;
    color: #444;
    font-size: 0.95rem;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="time"],
select,
textarea {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid #e1e5eb;
    border-radius: var(--radius-sm);
    box-sizing: border-box;
    font-size: 1rem;
    transition: var(--transition);
    background-color: #fafbfc;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    background-color: var(--white);
    box-shadow: 0 0 0 4px var(--primary-light);
}

/* Ratings */
.rating-group {
    background: #fcfdfe;
    padding: 20px;
    border-radius: var(--radius-md);
    margin-bottom: 15px;
    border: 1px solid #edf2f7;
}

.rating-options {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 10px;
    max-width: 100%;
}

.rating-options label {
    font-weight: 500;
    margin-bottom: 0;
    background: var(--white);
    padding: 10px 15px;
    border: 1px solid #e1e5eb;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: normal;
    word-break: break-word;
    flex: 1 1 auto;
    min-width: 120px;
}

.rating-options label:hover {
    background: var(--primary-light);
    border-color: var(--primary-color);
}

.rating-options input[type="radio"] {
    margin: 0;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 28px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    transition: var(--transition);
    width: 100%;
}

.btn-primary {
    background: linear-gradient(to right, var(--primary-color), var(--primary-dark));
    color: var(--white);
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 123, 255, 0.4);
}

/* Dashboard */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.stat-card {
    background: var(--white);
    padding: 30px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    text-align: center;
    transition: var(--transition);
    border-bottom: 4px solid var(--primary-color);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.stat-card .icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.stat-card .value {
    font-size: 2.8rem;
    font-weight: 800;
    color: var(--dark-color);
    margin: 10px 0;
}

/* Tables */
.table-container {
    background: var(--white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    margin-top: 20px;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 16px 20px;
    text-align: left;
}

th {
    background: var(--primary-light);
    color: var(--primary-dark);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 1px;
}

tr:nth-child(even) {
    background-color: #f8fafc;
}

tr:hover {
    background-color: #f1f5f9;
}

/* Alert */
.alert {
    padding: 18px 25px;
    margin-bottom: 30px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    gap: 15px;
    font-weight: 600;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border-left: 5px solid #28a745;
}

:root {
    --primary-color: #5597A9; 
    --primary-dark: #3D6D7A;
    --primary-light: #B2E2F2; 
    --secondary-color: #555555; 
    --accent-color: #FF7F27; 
    --light-bg: #F8FAFC; 
    --sidebar-bg: #1E293B;
    --sidebar-hover: #334155;
    --success-color: #10B981;
    --danger-color: #EF4444;
    --warning-color: #F59E0B;
    --info-color: #3B82F6;
    --white: #ffffff;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --radius-md: 12px;
    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dashboard Sidebar Layout */
.dashboard-wrapper {
    display: flex;
    min-height: 100vh;
    background-color: var(--light-bg);
}

.sidebar {
    width: 260px;
    background: var(--sidebar-bg);
    color: white;
    padding: 24px 0;
    position: fixed;
    height: 100vh;
    transition: var(--transition);
    z-index: 1000;
}

.sidebar-logo {
    padding: 24px;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    margin-bottom: 24px;
}

.sidebar-logo img {
    max-height: 80px;
    width: 100%;
    object-fit: contain;
    background: white;
    padding: 10px;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
}

.sidebar-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 24px;
    color: #94A3B8;
    text-decoration: none;
    transition: var(--transition);
    font-weight: 500;
}

.sidebar-link:hover, .sidebar-link.active {
    background: var(--sidebar-hover);
    color: white;
    border-right: 4px solid var(--accent-color);
}

.main-content {
    flex: 1;
    margin-left: 260px;
    padding: 32px;
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    background: white;
    padding: 16px 32px;
    margin: -32px -32px 32px -32px;
    box-shadow: var(--shadow-sm);
}

.mobile-nav-toggle {
    display: none;
}

/* Professional Stat Cards */
.pro-stat-card {
    background: white;
    border-radius: var(--radius-md);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    border: 1px solid #E2E8F0;
    transition: var(--transition);
}

.pro-stat-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

.stat-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.stat-icon-box {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.stat-value {
    font-size: 1.875rem;
    font-weight: 700;
    color: #1E293B;
}

.stat-label {
    color: #64748B;
    font-size: 0.875rem;
    font-weight: 500;
}

/* Data Table Refinement */
.pro-table-container {
    background: white;
    border-radius: var(--radius-md);
    border: 1px solid #E2E8F0;
    overflow: hidden;
}

.pro-table th {
    background: #F8FAFC;
    padding: 12px 24px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #64748B;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.pro-table td {
    padding: 16px 24px;
    border-top: 1px solid #F1F5F9;
}

/* Alert Styling */
.pro-alert {
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

@media (max-width: 1024px) {
    .sidebar { width: 80px; }
    .sidebar-link span, .sidebar-logo span { display: none; }
    .main-content { margin-left: 80px; }
}

@media (max-width: 768px) {
    .sidebar { display: none; }
    .main-content { margin-left: 0; padding: 16px; }
    .top-bar { 
        margin: -16px -16px 24px -16px; 
        padding: 12px 16px; 
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    /* Show menu items in top bar on mobile */
    .mobile-nav-toggle {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        width: 100%;
        margin-top: 10px;
        padding-top: 10px;
        border-top: 1px solid #eee;
    }
    
    .mobile-nav-link {
        font-size: 0.75rem;
        padding: 6px 10px;
        background: #f1f5f9;
        border-radius: 4px;
        text-decoration: none;
        color: var(--sidebar-bg);
        font-weight: 600;
    }
    
    .mobile-nav-link.active {
        background: var(--primary-color);
        color: white;
    }
}

.hero {
    text-align: center;
    padding: 60px 20px;
    background: var(--white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    margin-bottom: 40px;
    border-top: 6px solid var(--primary-color);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 10px;
    background: linear-gradient(to right, var(--primary-dark), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    font-size: 1.2rem;
    color: #666;
}

/* Feature Grid */
.feature-card {
    background: var(--white);
    padding: 40px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    text-align: center;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    border: 1px solid #eee;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.feature-card .icon-wrapper {
    width: 80px;
    height: 80px;
    background: var(--primary-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
    font-size: 2.5rem;
    color: var(--primary-color);
    transition: var(--transition);
}

.feature-card:hover .icon-wrapper {
    background: var(--primary-color);
    color: var(--white);
    transform: rotate(360deg);
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.feature-card p {
    color: #777;
    margin-bottom: 25px;
    font-size: 0.95rem;
}

/* Footer Styles */
.footer-text {
    margin-top: 60px;
    padding: 30px;
    border-top: 1px solid #ddd;
    text-align: center;
}

/* Responsive Design */
@media (max-width: 992px) {
    .dashboard-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .container {
        margin: 20px auto;
        padding: 0 15px;
    }

    .hero {
        padding: 40px 15px;
    }

    .hero h1 {
        font-size: 2.2rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .card {
        padding: 25px 15px;
    }

    h1 {
        font-size: 1.8rem;
    }

    .header-brand h1 {
        font-size: 1.6rem;
    }

    .rating-options {
        flex-direction: column;
        gap: 10px;
        width: 100%;
    }

    .rating-options label {
        width: 100%;
        margin-right: 0;
        justify-content: flex-start;
        flex: 1 1 100%;
    }

    /* Form specific adjustments */
    .dashboard-grid[style*="grid-template-columns: 1fr 1fr"],
    .dashboard-grid[style*="grid-template-columns: 1fr 1fr 1fr"] {
        grid-template-columns: 1fr !important;
    }

    /* Table responsiveness */
    .table-container {
        border-radius: 0;
        margin: 0 -15px;
        width: calc(100% + 30px);
        box-shadow: none;
    }

    table, thead, tbody, th, td, tr {
        display: block;
    }

    thead tr {
        position: absolute;
        top: -9999px;
        left: -9999px;
    }

    tr {
        border-bottom: 2px solid var(--primary-light);
        margin-bottom: 20px;
        background: var(--white);
        padding: 15px;
        border-radius: var(--radius-md);
        box-shadow: var(--shadow-sm);
    }

    td {
        border: none;
        position: relative;
        padding-left: 50% !important;
        text-align: right !important;
        padding-top: 10px !important;
        padding-bottom: 10px !important;
        min-height: 40px;
        white-space: normal !important;
    }

    td:before {
        position: absolute;
        top: 10px;
        left: 15px;
        width: 45%;
        padding-right: 10px;
        white-space: nowrap;
        text-align: left;
        font-weight: 700;
        color: var(--primary-dark);
        content: attr(data-label);
    }

    .nav {
        padding: 10px;
        gap: 15px;
    }

    .nav a {
        padding: 8px 10px;
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.8rem;
    }

    .btn {
        padding: 12px 20px;
        font-size: 0.95rem;
    }

    .stat-card .value {
        font-size: 2.2rem;
    }
}
