/* ========================================
   BASE.CSS - Global Styles
   Consolidated styles used across all pages
   ======================================== */

/* ========================================
   CSS RESET
   ======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ========================================
   CSS VARIABLES - Unified Color System
   ======================================== */
:root {
    /* Primary Colors - Monochromatic Professional */
    --primary-color: #2c2c2c;
    --primary-light: #4a4a4a;
    --primary-dark: #1a1a1a;
    --accent-color: #6b6b6b;
    --accent-dark: #2d3748;
    --accent-hover: #1a202c;
    
    /* Text Colors */
    --text-dark: #000;
    --text-primary: #0F172A;
    --text-medium: #5a5a5a;
    --text-secondary: #475569;
    --text-light: #8a8a8a;
    --text-muted: #94A3B8;
    
    /* Background Colors */
    --bg-white: #ffffff;
    --bg-light: #f8f9fa;
    --bg-lighter: #fafbfc;
    --bg-body: #F5F5F5;
    --bg-subtle: #F1F5F9;
    
    /* Border Colors */
    --border-color: #e8e8e8;
    --border-light: #e2e8f0;
    
    /* Shadows */
    --shadow-soft: 0 2px 8px rgba(0, 0, 0, 0.04);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.04);
    --shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 12px 32px rgba(0, 0, 0, 0.12);
    
    /* Status Colors */
    --color-success: #10B981;
    --color-warning: #ffc600;
    --color-danger: #dc3545;
    
    /* Gradients */
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* ========================================
   GLOBAL BASE STYLES
   ======================================== */
html {
    scroll-behavior: smooth;
}

body {
    font-family: "Inter", sans-serif;
    color: var(--text-primary);
    line-height: 1.6;
    background: var(--bg-body);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    margin: 0;
    padding: 0;
}

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

/* ========================================
   NAVIGATION
   ======================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: #fff;
    padding: 20px 0;
    z-index: 1000;
    border-bottom: solid 1px #eee;
}

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

.logo {
    display: flex;
    align-items: center;
}

.logo a {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo-img {
    height: 40px;
    width: auto;
    display: block;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark);
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    height: 40px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.user-greeting {
    color: var(--text-medium);
    font-weight: 500;
    font-size: 0.9375rem;
    padding-right: 0.5rem;
}

/* Profile Avatar Dropdown */
.profile-dropdown-container {
    position: relative;
}

.profile-avatar-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid #000;
    background: linear-gradient(135deg, #979797 0%, #000 100%);
    color: white;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    box-shadow: none;
    overflow: hidden;
}

.profile-avatar-btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

.profile-avatar-btn:focus,
.profile-avatar-btn:focus-visible,
.profile-avatar-btn:active {
    outline: none;
}

.profile-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.profile-avatar-initials {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: white;
    text-transform: uppercase;
}

.profile-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    box-shadow: var(--shadow-lg);
    min-width: 240px;
    z-index: 1000;
    display: none;
    overflow: hidden;
    animation: dropdownFadeIn 0.15s ease-out;
}

@keyframes dropdownFadeIn {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.profile-dropdown-container.active .profile-avatar-btn {
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

.dropdown-header {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-light);
    background-color: var(--bg-light);
}

.dropdown-name {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-dark);
    margin-bottom: 4px;
}

.dropdown-email {
    font-size: 12px;
    color: var(--text-medium);
}

.dropdown-divider {
    height: 1px;
    background-color: var(--border-light);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    color: var(--text-dark);
    text-decoration: none;
    font-size: 14px;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
    outline: none;
}

.dropdown-item:hover {
    background-color: #f5f5f5;
    color: var(--text-dark);
}

.dropdown-item:active,
.dropdown-item:focus,
.dropdown-item:focus-visible {
    background-color: transparent;
    color: var(--text-dark);
    outline: none;
}

.dropdown-item svg {
    flex-shrink: 0;
    color: var(--text-medium);
}

.dropdown-item-danger {
    color: #dc3545;
}

.dropdown-item-danger:hover {
    background-color: #f5f5f5;
    color: #dc3545;
}

.dropdown-item-danger:active,
.dropdown-item-danger:focus,
.dropdown-item-danger:focus-visible {
    background-color: transparent;
    color: #dc3545;
    outline: none;
}

.dropdown-item-danger svg {
    color: #dc3545;
}

/* ========================================
   BUTTONS - Base Styles
   ======================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.625rem 1.25rem;
    height: 40px;
    font-size: 0.9375rem;
    font-weight: 500;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    border: none;
    text-align: center;
    white-space: nowrap;
    line-height: 1;
}

.btn:active {
    transform: scale(0.98);
}

.btn-gradient {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0.625rem 1.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 0.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    box-shadow: 0 4px 6px rgba(102, 126, 234, 0.25);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.btn-gradient::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
    transition: left 0.6s ease;
}

.btn-gradient:hover::before {
    left: 100%;
}

.btn-gradient:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    box-shadow: 0 6px 12px rgba(102, 126, 234, 0.35);
    transform: translateY(-1px);
}

.btn-gradient:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(102, 126, 234, 0.25);
}

.btn-gradient:focus,
.btn-gradient:focus-visible {
    outline: none;
}

.btn-nav-subtle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 0.75rem;
    height: 40px;
    font-size: 0.9375rem;
    font-weight: 500;
    text-decoration: none;
    color: #475569;
    letter-spacing: -0.01em;
    transition: color 0.2s ease;
    outline: none;
    border: none;
    background: transparent;
    line-height: 1;
}

.btn-nav-subtle:hover {
    color: #0f172a;
    text-decoration: none;
}

.btn-nav-subtle:focus,
.btn-nav-subtle:active,
.btn-nav-subtle:focus-visible {
    outline: none;
    color: #0f172a;
}

.btn-primary {
    background: #000;
    color: white;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.btn-primary:hover {
    background: #1e293b;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.btn-primary:focus,
.btn-primary:focus-visible,
.btn-primary:active {
    outline: none;
    box-shadow: 0 0 0 3px rgba(15, 23, 42, 0.1);
}

.btn-secondary {
    background: #f8f9fa;
    color: #495057;
    box-shadow: none;
    border: 1px solid #dee2e6;
    font-weight: 400;
}

.btn-secondary:hover {
    background: #e9ecef;
    color: #212529;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border-color: #adb5bd;
    transform: none;
}

.btn-secondary:focus,
.btn-secondary:focus-visible,
.btn-secondary:active {
    outline: none;
}

.btn-outline {
    background: transparent;
    color: var(--text-dark);
    border: 1.5px solid var(--border-color);
}

.btn-outline:hover {
    background: var(--bg-lighter);
    border-color: var(--text-medium);
}

.btn-outline:focus,
.btn-outline:focus-visible,
.btn-outline:active {
    outline: none;
}

.btn-view-profile {
    width: 100%;
    background: var(--primary-color);
    color: white;
    padding: 0.75rem 1.5rem;
    font-size: 0.9375rem;
    font-weight: 500;
    box-shadow: var(--shadow-soft);
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.btn-view-profile:hover {
    background: var(--primary-dark);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.btn-view-profile:focus,
.btn-view-profile:focus-visible,
.btn-view-profile:active {
    outline: none;
}

/* ========================================
   FOOTER
   ======================================== */
.footer {
    background: #000;
    color: white;
    padding: 35px 0 18px;
    border-top: 1px solid var(--border-color);
    margin-top: 40px;
    width: 100%;
    clear: both;
}

.footer-content {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 2.5rem;
    margin-bottom: 2.5rem;
}

.footer-section h4 {
    font-size: 1rem;
    margin-bottom: 1.125rem;
    font-weight: 600;
    color: white;
}

.footer-section p {
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.7;
    font-size: 0.9375rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.625rem;
}

.footer-section ul li a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.2s ease;
    font-size: 0.9375rem;
}

.footer-section ul li a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.875rem;
}

/* ========================================
   UTILITY CLASSES
   ======================================== */

/* Selection Styling */
::selection {
    background: var(--primary-color);
    color: white;
}

/* Focus States for Accessibility */
.btn:focus:not(.btn-nav-subtle):not(:active),
a:focus:not(.btn-nav-subtle):not(:active) {
    outline: none;
}

/* Fade In Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.main-content-outer-wrapper{
    padding-top: 100px;
    min-height: calc(100vh - 340px);
}

@media (max-width: 768px) {
    .main-content-outer-wrapper {
        padding-top: 65px;
    }
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */
@media (max-width: 768px) {
    .container {
        padding: 0 1.25rem;
    }
    
    /* Navbar responsive */
    .nav-content {
        padding: 0 1.25rem;
    }
    
    .logo-img {
        height: 36px;
    }
    
    .navbar {
        padding: 0.875rem 0;
    }
    
    .nav-links {
        gap: 0.625rem;
    }
    
    .btn-nav-subtle {
        font-size: 0.875rem;
        padding: 0.4375rem 0.625rem;
        height: 36px;
    }
    
    .profile-avatar-btn {
        width: 36px;
        height: 36px;
        font-size: 13px;
    }

    .user-greeting {
        font-size: 0.8125rem;
        display: none;
    }

    /* Footer responsive */
    .footer {
        padding: 2.5rem 0 1.25rem;
        margin-top: 3rem;
    }

    .footer .container {
        padding: 0 1.25rem;
    }

    .footer-content {
        grid-template-columns: 1fr 1fr;
        gap: 1.5rem;
        margin-bottom: 1.5rem;
    }

    .footer-section:first-child {
        grid-column: 1 / -1;
        margin-bottom: 1rem;
    }

    .footer-section h4 {
        font-size: 0.8125rem;
        margin-bottom: 0.75rem;
    }

    .footer-section p {
        font-size: 0.7rem;
        line-height: 1.4;
        margin-top: 0.5rem;
    }

    .footer-section ul {
        margin-top: 0;
    }

    .footer-section ul li {
        margin-bottom: 0.4rem;
    }

    .footer-section ul li a {
        font-size: 0.75rem;
    }

    .footer-bottom {
        padding-top: 1.25rem;
    }

    .footer-bottom p {
        font-size: 0.75rem;
    }
    
    /* Button responsive */
    .btn-view-profile {
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: center;
        padding: 0.75rem 1.25rem;
        font-size: 0.875rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }
    
    /* Navbar responsive */
    .nav-content {
        padding: 0 1rem;
    }
    
    .logo-img {
        height: 32px;
    }
    
    .navbar {
        padding: 0.75rem 0;
    }
    
    .nav-links {
        gap: 0.5rem;
    }
    
    .btn-nav-subtle {
        font-size: 0.8125rem;
        padding: 0.375rem 0.5rem;
        height: 32px;
    }
    
    .profile-avatar-btn {
        width: 32px;
        height: 32px;
        font-size: 12px;
    }

    /* Footer responsive */
    .footer {
        padding: 2rem 0 1rem;
        margin-top: 2.5rem;
    }

    .footer .container {
        padding: 0 1rem;
    }

    .footer-content {
        grid-template-columns: 1fr 1fr;
        gap: 1.25rem;
        margin-bottom: 1.25rem;
    }

    .footer-section:first-child {
        grid-column: 1 / -1;
        margin-bottom: 0.75rem;
    }

    .footer-section h4 {
        font-size: 0.75rem;
        margin-bottom: 0.5rem;
        font-weight: 600;
    }

    .footer-section p {
        font-size: 0.65rem;
        line-height: 1.3;
        margin-top: 0.4rem;
    }

    .footer-section ul {
        margin-top: 0;
        padding-left: 0;
    }

    .footer-section ul li {
        margin-bottom: 0.35rem;
    }

    .footer-section ul li a {
        font-size: 0.6875rem;
        line-height: 1.4;
    }

    .footer-bottom {
        padding-top: 1rem;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }

    .footer-bottom p {
        font-size: 0.6875rem;
    }
    
    /* Button responsive */
    .btn-view-profile {
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: center;
        padding: 0.6875rem 1rem;
        font-size: 0.8125rem;
    }

    .btn {
        font-size: 0.8125rem;
        padding: 0.5rem 1rem;
    }
}
