/* Foner Brand Colors */
:root {
    /* Primary Brand Colors */
    --foner-red: #ED1C24;
    --foner-red-dark: #C62828;
    --foner-red-light: #FF5252;

    /* Neutral Colors */
    --dark-gray: #1E272E;
    --medium-gray: #2C3E50;
    --light-gray: #95A5A6;
    --border-gray: #E0E0E0;
    --bg-gray: #F5F7FA;

    /* Text Colors */
    --text-primary: #212121;
    --text-secondary: #666666;
    --text-light: #999999;

    /* Semantic Colors */
    --success: #27AE60;
    --warning: #F39C12;
    --info: #3498DB;
    --danger: var(--foner-red);

    /* Backgrounds */
    --bg-white: #FFFFFF;
    --bg-light: #F8F9FA;

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.12);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg-gray);
    color: var(--text-primary);
    line-height: 1.6;
}

/* Navigation Bar */
nav {
    background: var(--bg-white);
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border-gray);
}

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

.nav-left {
    display: flex;
    align-items: center;
    gap: 0;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    text-decoration: none;
}

.nav-logo img {
    height: 32px;
    width: auto;
}

.nav-links {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-links li {
    margin: 0;
}

.nav-links a {
    display: block;
    padding: 20px 24px;
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.2s;
    border-bottom: 3px solid transparent;
    font-weight: 500;
}

.nav-links a:hover {
    background-color: rgba(237, 28, 36, 0.05);
    border-bottom-color: rgba(237, 28, 36, 0.3);
    color: var(--foner-red);
}

.nav-links a.active {
    background-color: rgba(237, 28, 36, 0.1);
    border-bottom-color: var(--foner-red);
    color: var(--foner-red);
}

/* User Dropdown */
.user-dropdown {
    position: relative;
}

.user-button {
    background: none;
    border: none;
    color: var(--text-primary);
    padding: 15px 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    transition: background-color 0.2s;
    border-radius: 8px;
}

.user-button:hover {
    background-color: rgba(237, 28, 36, 0.05);
    color: var(--foner-red);
}

.user-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--foner-red);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 16px;
}

.dropdown-arrow {
    font-size: 10px;
    opacity: 0.7;
}

.dropdown-menu {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    background: white;
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    min-width: 220px;
    z-index: 1000;
    margin-top: 4px;
}

.dropdown-menu.show {
    display: block;
}

.dropdown-header {
    padding: 16px;
    border-bottom: 1px solid var(--border-gray);
}

.dropdown-email {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 4px;
    word-break: break-word;
}

.dropdown-role {
    font-size: 11px;
    color: var(--text-light);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.dropdown-menu a,
.dropdown-menu button {
    display: block;
    width: 100%;
    padding: 12px 16px;
    color: var(--text-primary);
    text-decoration: none;
    background: none;
    border: none;
    text-align: left;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s;
}

.dropdown-menu a:hover,
.dropdown-menu button:hover {
    background-color: var(--bg-light);
}

.dropdown-divider {
    height: 1px;
    background: var(--border-gray);
    margin: 4px 0;
}

/* Main Content */
.main-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 32px 20px;
}

/* Page Headers */
.page-header {
    margin-bottom: 32px;
}

.page-header h1 {
    color: var(--text-primary);
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 8px;
}

.page-header p {
    color: var(--text-secondary);
    font-size: 16px;
}

/* Cards */
.card {
    background: var(--bg-white);
    border-radius: 12px;
    padding: 24px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 24px;
}

.card:hover {
    box-shadow: var(--shadow-md);
    transition: box-shadow 0.2s;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
    font-size: 14px;
}

.btn-primary {
    background: var(--foner-red);
    color: white;
}

.btn-primary:hover {
    background: var(--foner-red-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: var(--medium-gray);
    color: white;
}

.btn-secondary:hover {
    background: var(--dark-gray);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--foner-red);
    color: var(--foner-red);
}

.btn-outline:hover {
    background: var(--foner-red);
    color: white;
}

/* Status Badges */
.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-success {
    background: rgba(39, 174, 96, 0.1);
    color: var(--success);
}

.badge-warning {
    background: rgba(243, 156, 18, 0.1);
    color: var(--warning);
}

.badge-danger {
    background: rgba(237, 28, 36, 0.1);
    color: var(--foner-red);
}

.badge-info {
    background: rgba(52, 152, 219, 0.1);
    color: var(--info);
}

/* Alerts */
.alert {
    padding: 16px 20px;
    border-radius: 8px;
    margin-bottom: 24px;
    border-left: 4px solid;
}

.alert-warning {
    background: #FFF8E1;
    border-left-color: var(--warning);
    color: #8B6914;
}

.alert-info {
    background: #E3F2FD;
    border-left-color: var(--info);
    color: #1565C0;
}

.alert-success {
    background: #E8F5E9;
    border-left-color: var(--success);
    color: #2E7D32;
}

.alert-danger {
    background: #FFEBEE;
    border-left-color: var(--foner-red);
    color: #C62828;
}

/* Forms */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="url"],
input[type="password"],
select,
textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border-gray);
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.2s;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--foner-red);
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 14px;
}

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

.help-text {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 4px;
}

.required {
    color: var(--foner-red);
}

/* Stub Pages */
.stub-message {
    background: var(--bg-white);
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    box-shadow: var(--shadow-sm);
}

.stub-icon {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.3;
}

.stub-message h2 {
    color: var(--text-primary);
    margin-bottom: 10px;
    font-size: 24px;
}

.stub-message p {
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.feature-list {
    text-align: left;
    display: inline-block;
    margin-top: 20px;
}

.feature-list h3 {
    color: var(--text-primary);
    font-size: 16px;
    margin-bottom: 10px;
    font-weight: 600;
}

.feature-list ul {
    list-style: none;
    padding: 0;
}

.feature-list li {
    padding: 8px 0;
    color: var(--text-secondary);
}

.feature-list li:before {
    content: "✓ ";
    color: var(--success);
    font-weight: bold;
    margin-right: 8px;
}

/* Profile Page */
.current-info {
    background: var(--bg-light);
    border-radius: 8px;
    padding: 20px;
    margin: 20px auto;
    max-width: 400px;
    text-align: left;
}

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-gray);
}

.info-row:last-child {
    border-bottom: none;
}

.info-label {
    font-weight: 600;
    color: var(--text-secondary);
}

.info-value {
    color: var(--text-primary);
}

/* Dashboard */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--bg-white);
    border-radius: 12px;
    padding: 24px;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s;
}

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

.stat-number {
    font-size: 36px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.quick-actions {
    background: var(--bg-white);
    border-radius: 12px;
    padding: 24px;
    box-shadow: var(--shadow-sm);
}

.quick-actions h2 {
    color: var(--text-primary);
    font-size: 20px;
    margin-bottom: 16px;
    font-weight: 600;
}

.action-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
}

.action-button {
    display: block;
    padding: 16px 20px;
    background: var(--foner-red);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    text-align: center;
    transition: all 0.2s;
    font-weight: 600;
}

.action-button:hover {
    background: var(--foner-red-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.action-button.secondary {
    background: var(--medium-gray);
}

.action-button.secondary:hover {
    background: var(--dark-gray);
}

/* TCR/Forms */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.checkbox-group {
    margin: 15px 0;
}

.checkbox-item {
    margin-bottom: 10px;
}

.checkbox-item input[type="checkbox"] {
    margin-right: 8px;
    cursor: pointer;
}

.checkbox-item label {
    display: inline;
    font-weight: normal;
    cursor: pointer;
}

.button-group {
    display: flex;
    gap: 15px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--border-gray);
}

.status-badge {
    display: inline-block;
    padding: 10px 16px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 14px;
}

.status-badge.status-pending {
    background: #FFF8E1;
    color: var(--warning);
}

.status-badge.status-approved {
    background: #E8F5E9;
    color: var(--success);
}

.status-badge.status-rejected {
    background: #FFEBEE;
    color: var(--danger);
}

.card-header {
    border-bottom: 2px solid var(--border-gray);
    padding-bottom: 15px;
    margin-bottom: 25px;
}

.card-header h2 {
    color: var(--text-primary);
    font-size: 24px;
    font-weight: 700;
}

.card-header p {
    color: var(--text-secondary);
    font-size: 14px;
    margin-top: 5px;
}

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

.btn-success:hover {
    background: #229954;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.section-heading {
    margin: 30px 0 20px;
    color: var(--text-primary);
    font-size: 18px;
    font-weight: 600;
}

.section-note {
    color: var(--text-secondary);
    margin-bottom: 15px;
    font-size: 14px;
}

.back-link-container {
    text-align: center;
    margin: 40px 0;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        align-items: stretch;
    }

    .nav-left {
        flex-direction: column;
        align-items: stretch;
    }

    .nav-logo {
        justify-content: center;
        padding: 16px;
    }

    .nav-links {
        flex-direction: column;
    }

    .nav-links a {
        text-align: center;
        padding: 16px;
    }

    .user-dropdown {
        text-align: center;
    }

    .user-button {
        justify-content: center;
    }

    .dropdown-menu {
        position: static;
        box-shadow: none;
        border-top: 1px solid var(--border-gray);
        border-radius: 0;
        margin-top: 0;
    }

    .main-content {
        padding: 20px 16px;
    }

    .page-header h1 {
        font-size: 24px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .button-group {
        flex-direction: column;
    }

    button, .btn {
        width: 100%;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }
}
