/* =================================================================
   macOS LIGHT THEME - PROJECT MANAGEMENT SYSTEM
   Inspirowany macOS Big Sur / Monterey
   ================================================================= */

/* =================================================================
   CSS RESET & BASE STYLES
   ================================================================= */
*,
*::before,
*::after {
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* =================================================================
   CSS VARIABLES - macOS DESIGN TOKENS
   ================================================================= */
:root {
    /* macOS Colors - Light Theme */
    --macos-blue: #007AFF;
    --macos-blue-hover: #0056CC;
    --macos-blue-light: rgba(0, 122, 255, 0.1);
    --macos-blue-ultra-light: rgba(0, 122, 255, 0.05);

    --macos-green: #30D158;
    --macos-green-light: rgba(48, 209, 88, 0.1);

    --macos-yellow: #FFD60A;
    --macos-yellow-light: rgba(255, 214, 10, 0.1);

    --macos-orange: #FF9500;
    --macos-orange-light: rgba(255, 149, 0, 0.1);

    --macos-red: #FF453A;
    --macos-red-light: rgba(255, 69, 58, 0.1);

    --macos-purple: #BF5AF2;
    --macos-purple-light: rgba(191, 90, 242, 0.1);

    --macos-pink: #FF2D92;
    --macos-pink-light: rgba(255, 45, 146, 0.1);

    --macos-indigo: #5856D6;
    --macos-indigo-light: rgba(88, 86, 214, 0.1);

    --macos-teal: #64D2FF;
    --macos-teal-light: rgba(100, 210, 255, 0.1);

    /* macOS Grays */
    --macos-gray-1: #F2F2F7;
    /* Ultra light */
    --macos-gray-2: #E5E5EA;
    /* Light */
    --macos-gray-3: #D1D1D6;
    /* Medium light */
    --macos-gray-4: #C7C7CC;
    /* Medium */
    --macos-gray-5: #8E8E93;
    /* Dark medium */
    --macos-gray-6: #636366;
    /* Dark */
    --macos-gray-7: #48484A;
    /* Ultra dark */

    /* Surface Colors */
    --surface-primary: #FFFFFF;
    --surface-secondary: #F8F9FA;
    --surface-tertiary: #F2F2F7;
    --surface-quaternary: #E5E5EA;
    --surface-translucent: rgba(255, 255, 255, 0.8);
    --surface-translucent-heavy: rgba(255, 255, 255, 0.9);

    /* Background Colors */
    --background-primary: #F2F2F7;
    --background-secondary: #FFFFFF;
    --background-translucent: rgba(242, 242, 247, 0.8);
    --background-material: rgba(255, 255, 255, 0.7);

    /* Text Colors */
    --text-primary: #1D1D1F;
    --text-secondary: #86868B;
    --text-tertiary: #A1A1A6;
    --text-quaternary: #C7C7CC;
    --text-inverse: #FFFFFF;
    --text-link: var(--macos-blue);
    --text-link-hover: var(--macos-blue-hover);

    /* Border Colors */
    --border-primary: rgba(0, 0, 0, 0.1);
    --border-secondary: rgba(0, 0, 0, 0.05);
    --border-translucent: rgba(0, 0, 0, 0.08);
    --border-light: rgba(0, 0, 0, 0.03);

    /* Shadow Colors */
    --shadow-small: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-medium: 0 4px 12px rgba(0, 0, 0, 0.15);
    --shadow-large: 0 8px 30px rgba(0, 0, 0, 0.12);
    --shadow-extra-large: 0 16px 40px rgba(0, 0, 0, 0.1);

    /* Backdrop Filters */
    --backdrop-blur: blur(20px);
    --backdrop-blur-heavy: blur(40px);
    --backdrop-saturate: saturate(180%);

    /* Animation Curves */
    --curve-standard: cubic-bezier(0.4, 0.0, 0.2, 1);
    --curve-decelerate: cubic-bezier(0.0, 0.0, 0.2, 1);
    --curve-accelerate: cubic-bezier(0.4, 0.0, 1, 1);
    --curve-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);

    /* Animation Durations */
    --duration-fast: 150ms;
    --duration-normal: 250ms;
    --duration-slow: 350ms;
    --duration-extra-slow: 500ms;

    /* Layout Variables */
    --sidebar-width: 280px;
    --topbar-height: 52px;
    --corner-radius: 12px;
    --corner-radius-small: 8px;
    --corner-radius-large: 16px;
    --corner-radius-extra-large: 20px;
}

/* =================================================================
   DARK THEME SUPPORT
   ================================================================= */
[data-bs-theme="dark"] {
    --surface-primary: #1C1C1E;
    --surface-secondary: #2C2C2E;
    --surface-tertiary: #38383A;
    --surface-quaternary: #48484A;
    --surface-translucent: rgba(28, 28, 30, 0.8);
    --surface-translucent-heavy: rgba(28, 28, 30, 0.9);

    --background-primary: #000000;
    --background-secondary: #1C1C1E;
    --background-translucent: rgba(0, 0, 0, 0.8);
    --background-material: rgba(28, 28, 30, 0.7);

    --text-primary: #FFFFFF;
    --text-secondary: #A1A1A6;
    --text-tertiary: #86868B;
    --text-quaternary: #636366;

    --border-primary: rgba(255, 255, 255, 0.1);
    --border-secondary: rgba(255, 255, 255, 0.05);
    --border-translucent: rgba(255, 255, 255, 0.08);
    --border-light: rgba(255, 255, 255, 0.03);
}

/* =================================================================
   BASE TYPOGRAPHY & LAYOUT
   ================================================================= */
html {
    font-size: 14px;
    height: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--background-primary);
    margin: 0;
    padding: 0;
    height: 100%;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* Enhanced scrollbars */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: var(--macos-gray-4);
    border-radius: 4px;
    transition: background var(--duration-fast) var(--curve-standard);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--macos-gray-5);
}

/* =================================================================
   LAYOUT CONTAINERS
   ================================================================= */
.app-container {
    display: flex;
    min-height: 100vh;
    background: var(--background-primary);
}

/* =================================================================
   SIDEBAR NAVIGATION - macOS Style
   ================================================================= */
.sidebar {
    width: var(--sidebar-width);
    background: var(--surface-translucent);
    backdrop-filter: var(--backdrop-blur) var(--backdrop-saturate);
    -webkit-backdrop-filter: var(--backdrop-blur) var(--backdrop-saturate);
    border-right: 1px solid var(--border-translucent);
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    z-index: 1000;
    overflow-y: auto;
    overflow-x: hidden;
    transition: transform var(--duration-normal) var(--curve-standard);
    display: flex;
    flex-direction: column;
}

/* Sidebar Header */
.sidebar-header {
    padding: 1.5rem 1.25rem 1rem;
    border-bottom: 1px solid var(--border-light);
    background: var(--surface-translucent-heavy);
    backdrop-filter: var(--backdrop-blur);
    -webkit-backdrop-filter: var(--backdrop-blur);
    position: sticky;
    top: 0;
    z-index: 2;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 700;
    font-size: 1.125rem;
    margin-bottom: 1rem;
    transition: color var(--duration-fast) var(--curve-standard);
    letter-spacing: -0.02em;
}

.sidebar-brand:hover {
    color: var(--macos-blue);
    text-decoration: none;
}

.brand-icon {
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, var(--macos-blue), var(--macos-indigo));
    border-radius: var(--corner-radius-small);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.75rem;
    color: white;
    font-size: 0.875rem;
    box-shadow: var(--shadow-small);
}

/* User Profile Card */
.user-profile-card {
    background: var(--surface-secondary);
    border: 1px solid var(--border-secondary);
    border-radius: var(--corner-radius);
    padding: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: all var(--duration-fast) var(--curve-standard);
    cursor: pointer;
}

.user-profile-card:hover {
    background: var(--surface-tertiary);
    border-color: var(--border-primary);
    transform: translateY(-1px);
    box-shadow: var(--shadow-small);
}

.user-avatar {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--macos-blue), var(--macos-purple));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.875rem;
    font-weight: 600;
    position: relative;
    flex-shrink: 0;
}

.user-avatar::after {
    content: '';
    position: absolute;
    bottom: -1px;
    right: -1px;
    width: 12px;
    height: 12px;
    background: var(--macos-green);
    border: 2px solid var(--surface-primary);
    border-radius: 50%;
    box-shadow: var(--shadow-small);
}

.user-info {
    flex: 1;
    min-width: 0;
}

.user-name {
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--text-primary);
    margin-bottom: 0.125rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: -0.01em;
}

.user-role {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.theme-toggle-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: var(--surface-tertiary);
    color: var(--text-secondary);
    border-radius: var(--corner-radius-small);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--duration-fast) var(--curve-standard);
    flex-shrink: 0;
}

.theme-toggle-btn:hover {
    background: var(--macos-blue-light);
    color: var(--macos-blue);
    transform: scale(1.05);
}

.theme-toggle-btn:active {
    transform: scale(0.95);
}

/* Search Box */
.sidebar-search {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-light);
    background: var(--surface-translucent);
}

.search-wrapper {
    position: relative;
}

.search-input {
    width: 100%;
    height: 36px;
    padding: 0 1rem 0 2.25rem;
    border: 1px solid var(--border-secondary);
    border-radius: var(--corner-radius-small);
    background: var(--surface-secondary);
    color: var(--text-primary);
    font-size: 0.875rem;
    font-family: inherit;
    transition: all var(--duration-fast) var(--curve-standard);
    outline: none;
}

.search-input:focus {
    border-color: var(--macos-blue);
    background: var(--surface-primary);
    box-shadow: 0 0 0 3px var(--macos-blue-light);
}

.search-input::placeholder {
    color: var(--text-tertiary);
}

.search-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-tertiary);
    font-size: 0.75rem;
    pointer-events: none;
}

/* Navigation */
.sidebar-nav {
    flex: 1;
    padding: 1rem 1.25rem 2rem;
}

.nav-section {
    margin-bottom: 1.5rem;
}

.nav-section:last-child {
    margin-bottom: 0;
}

.nav-section-title {
    font-size: 0.6875rem;
    font-weight: 700;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.5rem;
    padding: 0 0.75rem;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', sans-serif;
}

.nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.nav-item {
    position: relative;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 0.625rem 0.75rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--corner-radius-small);
    font-weight: 500;
    font-size: 0.875rem;
    transition: all var(--duration-fast) var(--curve-standard);
    position: relative;
    overflow: hidden;
    letter-spacing: -0.01em;
}

/* macOS-style selection */
.nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--macos-blue-ultra-light);
    opacity: 0;
    transition: opacity var(--duration-fast) var(--curve-standard);
    border-radius: var(--corner-radius-small);
}

.nav-link:hover::before {
    opacity: 0.6;
}

.nav-link.active::before {
    opacity: 1;
    background: var(--macos-blue-light);
}

.nav-link:hover {
    color: var(--text-primary);
    text-decoration: none;
    transform: translateX(2px);
}

.nav-link.active {
    color: var(--macos-blue);
    font-weight: 600;
}

.nav-link:active {
    transform: scale(0.98);
}

.nav-icon {
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.75rem;
    font-size: 0.875rem;
    position: relative;
    z-index: 1;
    flex-shrink: 0;
}

.nav-text {
    flex: 1;
    position: relative;
    z-index: 1;
}

.nav-badge {
    background: var(--macos-red);
    color: white;
    font-size: 0.6875rem;
    font-weight: 700;
    padding: 0.125rem 0.375rem;
    border-radius: 12px;
    margin-left: 0.5rem;
    position: relative;
    z-index: 1;
    min-width: 18px;
    text-align: center;
    line-height: 1;
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.05);
        opacity: 0.9;
    }
}

/* =================================================================
   MAIN CONTENT AREA
   ================================================================= */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    background: var(--background-primary);
    display: flex;
    flex-direction: column;
    transition: margin-left var(--duration-normal) var(--curve-standard);
}

.content-wrapper {
    flex: 1;
    padding: 1.5rem 2rem;
    max-width: 100%;
}

/* =================================================================
   NOTIFICATION SYSTEM - macOS Style Toast
   ================================================================= */
.notification-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 9999;
    pointer-events: none;
    max-width: 400px;
    width: 100%;
}

.toast-notification {
    background: var(--surface-translucent-heavy);
    backdrop-filter: var(--backdrop-blur) var(--backdrop-saturate);
    -webkit-backdrop-filter: var(--backdrop-blur) var(--backdrop-saturate);
    border: 1px solid var(--border-translucent);
    border-radius: var(--corner-radius);
    box-shadow: var(--shadow-large);
    padding: 1rem 1.25rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    pointer-events: auto;
    transform: translateX(100%);
    opacity: 0;
    transition: all var(--duration-normal) var(--curve-decelerate);
    position: relative;
    overflow: hidden;
    min-height: 64px;
}

.toast-notification.show {
    transform: translateX(0);
    opacity: 1;
}

.toast-notification.hide {
    transform: translateX(100%);
    opacity: 0;
}

/* Toast Types */
.toast-notification.success {
    border-left: 4px solid var(--macos-green);
}

.toast-notification.success .toast-icon {
    color: var(--macos-green);
}

.toast-notification.error {
    border-left: 4px solid var(--macos-red);
}

.toast-notification.error .toast-icon {
    color: var(--macos-red);
}

.toast-notification.warning {
    border-left: 4px solid var(--macos-orange);
}

.toast-notification.warning .toast-icon {
    color: var(--macos-orange);
}

.toast-notification.info {
    border-left: 4px solid var(--macos-blue);
}

.toast-notification.info .toast-icon {
    color: var(--macos-blue);
}

.toast-icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    margin-top: 0.125rem;
    flex-shrink: 0;
}

.toast-content {
    flex: 1;
    min-width: 0;
}

.toast-title {
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
    line-height: 1.4;
}

.toast-message {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    line-height: 1.4;
    word-wrap: break-word;
}

.toast-close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    width: 20px;
    height: 20px;
    border: none;
    background: var(--surface-tertiary);
    border-radius: 50%;
    color: var(--text-tertiary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    transition: all var(--duration-fast) var(--curve-standard);
    opacity: 0.8;
}

.toast-close:hover {
    background: var(--surface-quaternary);
    color: var(--text-secondary);
    opacity: 1;
    transform: scale(1.1);
}

.toast-close:active {
    transform: scale(0.9);
}

/* Progress indicator */
.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: var(--macos-blue);
    border-radius: 0 0 var(--corner-radius) var(--corner-radius);
    animation: toastProgress 5s linear forwards;
}

@keyframes toastProgress {
    from {
        width: 100%;
    }

    to {
        width: 0%;
    }
}

/* =================================================================
   FLASH MESSAGES - macOS Alert Style
   ================================================================= */
.alert {
    background: var(--surface-translucent);
    backdrop-filter: var(--backdrop-blur);
    -webkit-backdrop-filter: var(--backdrop-blur);
    border: 1px solid var(--border-translucent);
    border-radius: var(--corner-radius);
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 500;
    box-shadow: var(--shadow-small);
    position: relative;
    overflow: hidden;
}

.alert-success {
    border-left: 4px solid var(--macos-green);
    background: var(--macos-green-light);
    color: var(--text-primary);
}

.alert-danger,
.alert-error {
    border-left: 4px solid var(--macos-red);
    background: var(--macos-red-light);
    color: var(--text-primary);
}

.alert-warning {
    border-left: 4px solid var(--macos-orange);
    background: var(--macos-orange-light);
    color: var(--text-primary);
}

.alert-info {
    border-left: 4px solid var(--macos-blue);
    background: var(--macos-blue-light);
    color: var(--text-primary);
}

.alert i {
    font-size: 1.125rem;
    margin-right: 0.25rem;
}

.alert-dismissible {
    padding-right: 3rem;
}

.btn-close {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    background: var(--surface-primary);
    border: 1px solid var(--border-secondary);
    border-radius: 50%;
    color: var(--text-tertiary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    transition: all var(--duration-fast) var(--curve-standard);
}

.btn-close:hover {
    background: var(--surface-secondary);
    color: var(--text-secondary);
    transform: translateY(-50%) scale(1.1);
}

.btn-close::before {
    content: '×';
    font-size: 1rem;
    line-height: 1;
}

/* =================================================================
   BUTTONS - macOS Style
   ================================================================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.4;
    text-align: center;
    text-decoration: none;
    border: 1px solid transparent;
    border-radius: var(--corner-radius-small);
    cursor: pointer;
    transition: all var(--duration-fast) var(--curve-standard);
    position: relative;
    overflow: hidden;
    font-family: inherit;
    letter-spacing: -0.01em;
    gap: 0.375rem;
}

.btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px var(--macos-blue-light);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

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

.btn-primary {
    background: var(--macos-blue);
    color: white;
    box-shadow: var(--shadow-small);
}

.btn-primary:hover {
    background: var(--macos-blue-hover);
    color: white;
    box-shadow: var(--shadow-medium);
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--surface-secondary);
    color: var(--text-primary);
    border-color: var(--border-primary);
}

.btn-secondary:hover {
    background: var(--surface-tertiary);
    color: var(--text-primary);
    border-color: var(--border-secondary);
    transform: translateY(-1px);
}

.btn-success {
    background: var(--macos-green);
    color: white;
    box-shadow: var(--shadow-small);
}

.btn-success:hover {
    background: #28CD55;
    color: white;
    box-shadow: var(--shadow-medium);
    transform: translateY(-1px);
}

.btn-warning {
    background: var(--macos-orange);
    color: white;
    box-shadow: var(--shadow-small);
}

.btn-warning:hover {
    background: #FF8C00;
    color: white;
    box-shadow: var(--shadow-medium);
    transform: translateY(-1px);
}

.btn-danger {
    background: var(--macos-red);
    color: white;
    box-shadow: var(--shadow-small);
}

.btn-danger:hover {
    background: #FF3B30;
    color: white;
    box-shadow: var(--shadow-medium);
    transform: translateY(-1px);
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.8125rem;
}

.btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
}

/* =================================================================
   CARDS - macOS Style
   ================================================================= */
.card {
    background: var(--surface-primary);
    border: 1px solid var(--border-secondary);
    border-radius: var(--corner-radius);
    box-shadow: var(--shadow-small);
    transition: all var(--duration-fast) var(--curve-standard);
    overflow: hidden;
    position: relative;
}

.card:hover {
    box-shadow: var(--shadow-medium);
    transform: translateY(-2px);
    border-color: var(--border-primary);
}

.card-header {
    background: var(--surface-secondary);
    border-bottom: 1px solid var(--border-light);
    padding: 1rem 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9375rem;
}

.card-body {
    padding: 1.25rem;
}

.card-footer {
    background: var(--surface-secondary);
    border-top: 1px solid var(--border-light);
    padding: 1rem 1.25rem;
}

/* =================================================================
   FORMS - macOS Style
   ================================================================= */
.form-control {
    display: block;
    width: 100%;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 400;
    line-height: 1.5;
    color: var(--text-primary);
    background-color: var(--surface-primary);
    border: 1px solid var(--border-secondary);
    border-radius: var(--corner-radius-small);
    transition: all var(--duration-fast) var(--curve-standard);
    font-family: inherit;
}

.form-control:focus {
    border-color: var(--macos-blue);
    outline: none;
    box-shadow: 0 0 0 3px var(--macos-blue-light);
    background-color: var(--surface-primary);
    color: var(--text-primary);
}

.form-control::placeholder {
    color: var(--text-tertiary);
}

.form-label {
    display: inline-block;
    margin-bottom: 0.375rem;
    font-weight: 500;
    color: var(--text-primary);
    font-size: 0.875rem;
}

.form-select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m1 6 7 7 7-7'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 16px 12px;
    padding-right: 2.5rem;
}

/* =================================================================
   MOBILE RESPONSIVENESS
   ================================================================= */
.mobile-menu-toggle {
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 1100;
    background: var(--surface-translucent);
    backdrop-filter: var(--backdrop-blur);
    -webkit-backdrop-filter: var(--backdrop-blur);
    border: 1px solid var(--border-translucent);
    border-radius: var(--corner-radius);
    width: 44px;
    height: 44px;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-medium);
    transition: all var(--duration-fast) var(--curve-standard);
}

.mobile-menu-toggle:hover {
    background: var(--surface-translucent-heavy);
    transform: translateY(-1px);
    box-shadow: var(--shadow-large);
}

.mobile-menu-toggle .btn {
    border: none;
    background: none;
    color: var(--text-primary);
    padding: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 999;
    opacity: 0;
    transition: opacity var(--duration-normal) var(--curve-standard);
}

.sidebar-overlay.show {
    display: block;
    opacity: 1;
}

/* =================================================================
   LOADING STATES
   ================================================================= */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--background-translucent);
    backdrop-filter: var(--backdrop-blur);
    -webkit-backdrop-filter: var(--backdrop-blur);
    z-index: 9998;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--duration-normal) var(--curve-standard);
}

.loading-overlay.show {
    display: flex;
    opacity: 1;
}

.loading-spinner {
    background: var(--surface-translucent);
    backdrop-filter: var(--backdrop-blur);
    -webkit-backdrop-filter: var(--backdrop-blur);
    border: 1px solid var(--border-translucent);
    border-radius: var(--corner-radius);
    padding: 2rem;
    text-align: center;
    box-shadow: var(--shadow-large);
    max-width: 300px;
    animation: fadeInUp var(--duration-normal) var(--curve-decelerate);
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-secondary);
    border-top: 3px solid var(--macos-blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.9);
    }

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

/* =================================================================
   BREADCRUMBS
   ================================================================= */
.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    padding: 0;
    margin-bottom: 1rem;
    list-style: none;
    background-color: transparent;
    font-size: 0.875rem;
}

.breadcrumb-item {
    color: var(--text-tertiary);
}

.breadcrumb-item+.breadcrumb-item::before {
    content: '›';
    color: var(--text-quaternary);
    margin: 0 0.5rem;
    font-weight: 500;
}

.breadcrumb-item a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color var(--duration-fast) var(--curve-standard);
}

.breadcrumb-item a:hover {
    color: var(--macos-blue);
}

.breadcrumb-item.active {
    color: var(--text-primary);
    font-weight: 500;
}

/* =================================================================
   RESPONSIVE BREAKPOINTS
   ================================================================= */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
    }

    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.show {
        transform: translateX(0);
        box-shadow: var(--shadow-extra-large);
    }

    .main-content {
        margin-left: 0;
    }

    .content-wrapper {
        padding: 1rem;
    }

    .notification-container {
        left: 1rem;
        right: 1rem;
        max-width: none;
    }

    .toast-notification {
        margin-bottom: 0.75rem;
    }
}

@media (max-width: 480px) {
    :root {
        font-size: 13px;
    }

    .content-wrapper {
        padding: 0.75rem;
    }

    .card-body {
        padding: 1rem;
    }

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

/* =================================================================
   UTILITY CLASSES
   ================================================================= */
.glass-effect {
    background: var(--surface-translucent);
    backdrop-filter: var(--backdrop-blur) var(--backdrop-saturate);
    -webkit-backdrop-filter: var(--backdrop-blur) var(--backdrop-saturate);
    border: 1px solid var(--border-translucent);
}

.text-gradient {
    background: linear-gradient(135deg, var(--macos-blue), var(--macos-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 600;
}

.shadow-lift {
    transition: all var(--duration-fast) var(--curve-standard);
}

.shadow-lift:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-large);
}

/* =================================================================
   PRINT STYLES
   ================================================================= */
@media print {

    .sidebar,
    .mobile-menu-toggle,
    .sidebar-overlay,
    .notification-container {
        display: none !important;
    }

    .main-content {
        margin-left: 0 !important;
    }

    .card {
        box-shadow: none !important;
        border: 1px solid #ddd !important;
    }

    body {
        background: white !important;
        color: black !important;
    }
}

/* =================================================================
   HIGH CONTRAST MODE
   ================================================================= */
@media (prefers-contrast: high) {
    :root {
        --border-primary: #000000;
        --text-primary: #000000;
        --text-secondary: #333333;
    }

    [data-bs-theme="dark"] {
        --border-primary: #ffffff;
        --text-primary: #ffffff;
        --text-secondary: #cccccc;
    }
}

/* =================================================================
   REDUCED MOTION
   ================================================================= */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .toast-notification,
    .alert,
    .card,
    .btn {
        transition: none !important;
        animation: none !important;
    }
}

/* =================================================================
   CUSTOM ANIMATIONS
   ================================================================= */
@keyframes slideInFromRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

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

@keyframes slideOutToRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }

    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }

    to {
        opacity: 0;
    }
}

@keyframes scaleIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* =================================================================
   TABLES - macOS Style
   ================================================================= */
.table-responsive {
    border-radius: var(--corner-radius);
    overflow: hidden;
    box-shadow: var(--shadow-small);
    border: 1px solid var(--border-secondary);
}

.table {
    margin: 0;
    font-size: 0.875rem;
}

.table thead th {
    background: var(--surface-secondary);
    border: none;
    font-weight: 600;
    color: var(--text-primary);
    padding: 1rem 1.25rem;
    font-size: 0.8125rem;
    text-transform: none;
    letter-spacing: -0.01em;
    border-bottom: 1px solid var(--border-light);
}

.table tbody td {
    padding: 1rem 1.25rem;
    border-color: var(--border-light);
    vertical-align: middle;
    background: var(--surface-primary);
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-light);
}

.table tbody tr:hover {
    background-color: var(--surface-secondary);
}

.table tbody tr:last-child td {
    border-bottom: none;
}

/* =================================================================
   PAGE HEADER
   ================================================================= */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-light);
}

.page-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    letter-spacing: -0.02em;
}

.page-title i {
    color: var(--macos-blue);
    font-size: 1.5rem;
}

/* =================================================================
   ENHANCED FOCUS STYLES
   ================================================================= */
:focus-visible {
    outline: 2px solid var(--macos-blue);
    outline-offset: 2px;
    border-radius: var(--corner-radius-small);
}

/* Remove default focus styles */
:focus {
    outline: none;
}

/* Specific focus styles for interactive elements */
.btn:focus-visible,
.form-control:focus-visible,
.nav-link:focus-visible {
    box-shadow: 0 0 0 3px var(--macos-blue-light);
    outline: none;
}