/* Main Styles */
:root {
    --color-primary: #F97316;
    --color-bg-body: #F3F4F6;
    --color-bg-white: #FFFFFF;
    --color-bg-subtle: #F9FAFB;
    --color-bg-info: #EFF6FF;
    --color-text-info: #1E40AF;
    --color-text-main: #1F2937;
    --color-text-secondary: #6B7280;
    --color-border: #E5E7EB;
    --color-hover: #F3F4F6;
    --color-card-border: #9CA3AF;
    --font-sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --settings-cols: 4;
}

body.dark-mode {
    --color-bg-body: #252a2e;
    --color-bg-white: #1f1e2e;
    --color-bg-subtle: #2a293d;
    --color-bg-info: #1E3A8A;
    /* Darker blue background */
    --color-text-info: #DBEAFE;
    --color-text-main: #F9FAFB;
    --color-text-secondary: #9CA3AF;
    --color-border: #2a293d;
    --color-hover: #2a293d;
    --color-card-border: #3A4556;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: var(--font-sans);
    background-color: var(--color-bg-body);
    color: var(--color-text-main);
    -webkit-font-smoothing: antialiased;
    transition: background-color 0.3s ease, color 0.3s ease;
}

a {
    text-decoration: none;
    color: inherit;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    margin: 0;
    font-weight: 600;
}

button {
    cursor: pointer;
    border: none;
    background: none;
    padding: 0;
    font: inherit;
}

/* Wrapper for Login */
.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: #F3F4F6;
}

.login-container {
    background: var(--color-bg-white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 400px;
}

.login-logo {
    text-align: center;
    margin-bottom: 2rem;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--color-text-secondary);
    font-size: 0.8rem;
}

.form-group input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    font-size: 1rem;
}

.btn-primary {
    background-color: var(--color-primary);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 9999px;
    font-weight: 600;
    transition: opacity 0.2s;
    text-align: center;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary:hover {
    opacity: 0.9;
}

.full-width {
    width: 100%;
}

.alert {
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 6px;
    font-size: 0.9rem;
}

.alert.error {
    background-color: #FEF2F2;
    color: #B91C1C;
    border: 1px solid #FECACA;
}

/* Sidebar Styles */
.sidebar {
    width: 260px;
    height: 100vh;
    background-color: #1f1e2e;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    position: fixed;
    left: 0;
    top: 0;
    overflow-y: auto;
    z-index: 50;
    transition: transform 0.3s ease-in-out;
    /* Custom Scrollbar */
    scrollbar-width: thin;
    scrollbar-color: #F3F4F6 transparent;
}

.sidebar::-webkit-scrollbar {
    width: 5px;
}

.sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
    background-color: #F3F4F6;
    border-radius: 20px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background-color: #E5E7EB;
}

.sidebar-header {
    padding: 1.5rem;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.logo-img {
    height: 40px;
    width: auto;
    object-fit: contain;
}

.logo-text {
    font-size: 1.25rem;
    font-weight: 700;
    color: #ffffff;
}

.search-bar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background-color: rgba(255, 255, 255, 0.05);
    padding: 0.6rem 1rem;
    border-radius: 8px;
    color: #9CA3AF;
    font-size: 0.875rem;
    cursor: text;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.search-bar .shortcut {
    margin-left: auto;
    font-size: 0.75rem;
    background-color: rgba(255, 255, 255, 0.1);
    color: #D1D5DB;
    padding: 0.1rem 0.3rem;
    border-radius: 4px;
    border: none;
}

.sidebar-nav {
    flex: 1;
    padding: 0 1rem;
}

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

.nav-section h3 {
    font-size: 0.75rem;
    color: #6B7280;
    margin-bottom: 0.5rem;
    padding-left: 0.75rem;
    /* text-transform: uppercase; Removed to match design */
    font-weight: 600;
    font-size: 0.7rem;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0.75rem;
    border-radius: 8px;
    color: #9CA3AF;
    font-weight: 500;
    margin-bottom: 0.2rem;
    transition: all 0.2s;
    font-size: 0.95rem;
    /* Explicit size */
}

.nav-item:hover {
    background-color: rgba(255, 255, 255, 0.05);
    color: #ffffff;
}

.nav-item.active {
    background-color: rgba(249, 115, 22, 0.15) !important;
    /* Lighter orange - overrides previous */
    color: var(--color-primary);
    border-left: 3px solid var(--color-primary);
    font-size: 0.85rem !important;
    font-weight: 500 !important;
}

.nav-icon {
    color: var(--color-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
}

.nav-item:hover .nav-icon {
    transform: scale(1.1);
}

/* Dashboard Bottom Grid */
.dashboard-bottom-grid {
    display: grid;
    grid-template-columns: 1fr 300px;
    /* Feed wider, sidebar fixed width */
    gap: 2rem;
    align-items: start;
}

@media (max-width: 1200px) {
    .dashboard-bottom-grid {
        grid-template-columns: 1fr;
        /* Stack on smaller screens */
    }
}

.sidebar-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
}

.user-profile:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.avatar {
    width: 36px;
    height: 36px;
    background-color: #E0E7FF;
    color: #4F46E5;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.user-info {
    display: flex;
    flex-direction: column;
}

.user-info .name {
    font-size: 0.875rem;
    font-weight: 600;
    color: #ffffff;
}

.user-info .role {
    font-size: 0.75rem;
    color: #9CA3AF;
}

/* Mobile Header */
.mobile-header {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background-color: var(--color-bg-white);
    border-bottom: 1px solid var(--color-border);
    z-index: 40;
    align-items: center;
    padding: 0 1rem;
    justify-content: space-between;
}

.mobile-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    overflow: hidden;
    background-color: var(--color-bg-body);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--color-primary);
}

.mobile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.btn-menu-toggle {
    font-size: 28px;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    /* Align left due to padding */
    color: var(--color-text-main);
    background: transparent;
    border: none;
    cursor: pointer;
    line-height: 1;
}

.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    z-index: 45;
}

.btn-close-sidebar {
    display: none;
    margin-left: auto;
    color: var(--color-text-secondary);
}

/* Utilities */
.dashboard-content {
    flex: 1;
    padding: 2rem;
    margin-left: 260px;
    min-height: 100vh;
    background-color: var(--color-bg-body);
}

.dashboard-header, .page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
}

.page-header.with-border {
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--color-border);
}

.greeting-section, .page-title-section {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.page-title-icon {
    width: 54px;
    height: 54px;
    border-radius: 12px;
    background-color: var(--color-bg-white);
    border: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-primary);
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.greeting-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background-color: #E0E7FF;
    color: #4F46E5;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 600;
}

.greeting-text h1, .page-title-text h1 {
    font-size: 1.5rem;
    color: var(--color-text-main);
    margin: 0;
}

.greeting-text p, .page-title-text p {
    margin: 0.25rem 0 0 0;
    color: var(--color-text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
}


/* Update: Dashboard Top Grid Layout */
.dashboard-top-grid {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2rem;
    overflow-x: auto;
    /* Allow scrolling if content gets too wide */
    padding-bottom: 1rem;
    /* Space for scrollbar */
}

.dashboard-top-grid,
.dashboard-bottom-grid,
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    grid-auto-flow: dense;
}

.dashboard-top-grid .widget,
.dashboard-bottom-grid .widget,
.dashboard-grid .widget {
    grid-column: span 4;
    /* Default 1/3 width */
    min-width: 0;
    /* Allow grid to handle width */
}

.feed-section {
    grid-column: span 4;
}

@media (max-width: 1400px) {

    .dashboard-top-grid,
    .dashboard-bottom-grid,
    .dashboard-grid {
        grid-template-columns: repeat(12, 1fr);
    }
}

@media (max-width: 1024px) {

    .dashboard-top-grid,
    .dashboard-bottom-grid,
    .dashboard-grid {
        grid-template-columns: repeat(8, 1fr);
    }
}

@media (max-width: 768px) {

    .dashboard-top-grid,
    .dashboard-bottom-grid,
    .dashboard-grid {
        grid-template-columns: 1fr;
    }


    .dashboard-top-grid .widget,
    .dashboard-bottom-grid .widget,
    .dashboard-grid .widget {
        grid-column: span 1 !important;
    }

    .feed-section {
        grid-column: span 1 !important;
    }
}



.widget {
    background-color: var(--color-bg-white);
    border-radius: 12px;
    padding: 1.25rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--color-border);
    display: flex;
    flex-direction: column;
    position: relative;
    /* Ensure absolute children are contained */
    -webkit-user-select: none;
    user-select: none;
    /* Prevent text selection dragging */
    /* Allow resizing */
    /* Resizing disabled by default */
    resize: none;
    overflow: hidden;
    /* Hide scrollbars when not resizing if content fits, or auto? Auto is better for content. */
    overflow: auto;
    min-width: 300px;
    min-height: 200px;
}

body.customizing-dashboard .widget {
    resize: both;
    border: 2px dashed var(--color-primary) !important;
    /* Visual cue */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.widget-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.time-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.time-circle {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    border: 4px solid #F3F4F6;
    border-top-color: var(--color-primary);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.time-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-text-main);
}

.btn-clock-in {
    width: 100%;
    background-color: var(--color-text-main);
    color: white;
    padding: 0.75rem 2rem;
    border-radius: 9999px;
    font-weight: 500;
    transition: background-color 0.2s;
}

.btn-clock-out {
    background-color: #EA580C;
}

.time-circle.pulsing {
    animation: pulse-border 2s infinite;
    border-top-color: #22C55E;
}

@keyframes pulse-border {
    0% {
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(34, 197, 94, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
    }
}

/* Mobile */
@media (max-width: 1024px) {
    .widgets-grid-new {
        grid-template-columns: 1fr;
    }

    .dashboard-bottom-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .dashboard-content {
        margin-left: 0 !important;
        padding: 1rem !important;
        padding-top: 60px !important;
    }

    .dashboard-top-grid .widget,
    .dashboard-bottom-grid .widget,
    .dashboard-grid .widget,
    .feed-section {
        grid-column: span 12 !important;
    }

    .sidebar {
        transform: translateX(-100%);
        box-shadow: 2px 0 8px rgba(0, 0, 0, 0.1);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .mobile-header {
        display: flex;
    }

    .sidebar-overlay {
        display: none;
    }

    .btn-close-sidebar {
        display: block;
    }

    .search-bar .shortcut {
        display: none;
    }

    .greeting-avatar {
        width: 48px !important;
        height: 48px !important;
        font-size: 1.1rem !important;
    }

    .greeting-text h1 {
        font-size: 1.5rem !important;
    }
}

.btn-width-control {
    background: #F3F4F6;
    border: none;
    border-radius: 4px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-weight: bold;
    color: #4B5563;
    transition: all 0.2s;
}

.btn-width-control:hover {
    background: #E5E7EB;
    color: #111827;
}



/* New Dashboard Styles */
.widgets-grid-new {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.dashboard-bottom-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
}

/* Clock Widget Redesign */
.clock-widget-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

/* Customization UI */
.btn-close-widget,
.btn-fluid-widget,
.btn-2x-widget {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: var(--color-text-secondary);
    cursor: pointer;
    display: none;
    /* Hidden by default */
    padding: 0 0.5rem;
    line-height: 1;
    opacity: 0.6;
    transition: opacity 0.2s;
}

.btn-close-widget:hover {
    opacity: 1;
    color: #EF4444;
}

.customize-widgets-container {
    position: relative;
    display: inline-block;
}

.customize-widgets-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0.5rem;
    background: var(--color-bg-white);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    min-width: 200px;
    padding: 0.5rem;
    z-index: 100;
}

.customize-widgets-menu.show {
    display: block;
}

.customize-menu-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    cursor: pointer;
    border-radius: 4px;
}

.customize-menu-item:hover {
    background-color: var(--color-hover);
}

.clock-left {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.clock-status {
    font-size: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.status-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: #E5E7EB;
}

.status-dot.active {
    background-color: #22C55E;
}

.clock-subtitle {
    font-size: 0.875rem;
    color: var(--color-text-secondary);
    margin-bottom: 1rem;
}

.clock-circle-small {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background-color: #F8F9FA;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-text-main);
    border: 4px solid #F3F4F6;
}

/* Events Widget */
.event-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid #F3F4F6;
}

.event-item:last-child {
    border-bottom: none;
}

.event-info h4 {
    font-size: 0.9rem;
    margin-bottom: 0.2rem;
}

.event-info p {
    font-size: 0.75rem;
    color: var(--color-text-secondary);
    margin: 0;
}

.event-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: #FEF2F2;
    color: #DC2626;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    min-width: 40px;
}

.event-date span:first-child {
    font-size: 0.65rem;
    text-transform: uppercase;
}

.event-date span:last-child {
    font-size: 1rem;
}

/* Feed Section */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.section-title {
    font-size: 1.25rem;
    font-weight: 700;
}

.feed-filters {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.feed-card {
    background-color: var(--color-bg-white);
    border-radius: 12px;
    border: 1px solid var(--color-border);
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.feed-header {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.feed-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.feed-meta h4 {
    font-size: 0.9rem;
    margin-bottom: 0.1rem;
}

.feed-meta p {
    font-size: 0.75rem;
    color: var(--color-text-secondary);
    margin: 0;
}

.feed-content h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.feed-content p {
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--color-text-secondary);
    margin-bottom: 1rem;
}

.feed-image {
    width: 100%;
    border-radius: 8px;
    margin-top: 1rem;
}


/* Profile Page Styles */
.profile-header {
    margin-bottom: 2rem;
}

.profile-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    border-bottom: 1px solid var(--color-border);
    margin-bottom: 2rem;
    padding-bottom: 1rem;
}

.tab-btn {
    padding: 0.5rem 1rem;
    color: var(--color-text-secondary);
    font-weight: 500;
    background-color: transparent;
    border: none;
    cursor: pointer;
    border-radius: 20px;
    /* Pill shape */
    transition: all 0.2s;
    font-size: 0.85rem;
}

.tab-btn:hover {
    background-color: var(--color-hover);
    color: var(--color-text-main);
}

.tab-btn.active {
    color: #DC2626;
    /* Red active color */
    font-weight: 600;
    background-color: var(--color-bg-subtle);
    border-bottom: none;
}

.tab-btn.active::after {
    display: none;
}

.profile-content {
    display: none;
}

.profile-content.active {
    display: block;
}

/* Profile Layout - Horizontal Grid (V2) */
.profile-horizontal-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    align-items: start;
}

@media (max-width: 600px) {
    .profile-horizontal-grid {
        grid-template-columns: 1fr;
    }
}

/* Obsolete split layout - kept for reference or removal */
/* .profile-layout-split { display: none; } */

/* Widget Grid (Inside Main Area) */
.profile-widget-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    /* 2 columns for "squares" */
    gap: 1.5rem;
    align-content: start;
    /* Prevent stretching */
}

/* Ensure widgets inside span 2 if needed (like Pulse/Trainings) */
.profile-widget-grid .widget[style*="grid-column: span 2"] {
    grid-column: span 2;
}

@media (max-width: 768px) {
    .profile-widget-grid {
        grid-template-columns: 1fr;
        /* 1 column on mobile */
    }
}

/* Profile Grid - Overview (Legacy - kept if needed for other tabs, else removed) */
/* .profile-grid-overview removed in favor of split layout */
.profile-grid-details {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
}

@media (max-width: 1024px) {
    .profile-grid-details {
        grid-template-columns: 1fr;
    }
}

/* Profile Widgets */
.pulse-grid {
    display: flex;
    justify-content: space-between;
    text-align: center;
    margin-top: 1rem;
}

.pulse-day {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: var(--color-text-secondary);
}

.pulse-icon {
    width: 32px;
    height: 32px;
    background-color: #F3F4F6;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

.training-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 1rem;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    margin-bottom: 1rem;
}

.training-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.stat-box {
    padding: 1rem;
    background-color: #F9FAFB;
    border-radius: 8px;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--color-text-secondary);
}

/* Profile Detail Sidebar */
.detail-group {
    margin-bottom: 1.5rem;
}

.detail-label {
    font-size: 0.85rem;
    color: var(--color-text-secondary);
    margin-bottom: 0.25rem;
    display: block;
}

.detail-value {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--color-text-main);
}

.detail-input {
    width: 100%;
    padding: 0.6rem;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    font-size: 0.9rem;
    background-color: var(--color-bg-white);
}

.report-to-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem;
    background-color: #F9FAFB;
    border-radius: 8px;
    margin-top: 0.5rem;
}

/* Forms in Details Tab */
.form-section {
    margin-bottom: 3rem;
    background-color: var(--color-bg-white);
    /* rounded corners and spacing handled by container or individually if needed, 
       but standardizing on existing structure */
}

.form-section-header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.section-icon {
    width: 40px;
    height: 40px;
    color: #F97316;
    background-color: #FFF1F2;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

/* Personal Details & Common Form Styles */
.form-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

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

@media (max-width: 768px) {

    .form-grid-2,
    .form-grid-3 {
        grid-template-columns: 1fr;
    }
}

/* Timeline (Planning) */
.timeline-container {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin: 3rem 0;
    overflow-x: auto;
    padding: 1rem 0;
}

.timeline-card {
    background: var(--color-bg-white);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 1rem;
    min-width: 150px;
    text-align: center;
    position: relative;
    opacity: 0.6;
}

.timeline-card.active {
    opacity: 1;
    border-color: var(--color-text-main);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.timeline-card.active::after {
    content: '+';
    position: absolute;
    right: -20px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    background: var(--color-bg-white);
    border: 1px solid var(--color-primary);
    color: var(--color-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    z-index: 2;
}

.timeline-date {
    font-size: 0.75rem;
    background: var(--color-text-main);
    color: var(--color-bg-white);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    display: inline-block;
    margin-bottom: 0.5rem;
}

/* Schedule Table */
.schedule-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    background: var(--color-bg-white);
    border: 1px solid var(--color-border);
    border-radius: 8px;
}

.schedule-table th,
.schedule-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--color-border);
}

.schedule-table th {
    background-color: var(--color-bg-subtle);
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--color-text-secondary);
}

.schedule-tag {
    background-color: #E0E7FF;
    color: #4F46E5;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.85rem;
    font-weight: 500;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    background: var(--color-bg-white);
    border: 1px solid var(--color-border);
    border-radius: 8px;
}

/* Fix for Dashboard Widgets Grid */
.dashboard-top-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
    width: 100%;
    align-items: start;
}

.dashboard-top-grid .widget {
    height: auto;
    margin-bottom: 0;
}

@media (max-width: 1024px) {
    .dashboard-top-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .dashboard-top-grid {
        grid-template-columns: 1fr;
    }
}

/* Dashboard Bottom Grid (Feed + Sidebar) */
.dashboard-bottom-grid {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 2rem;
    align-items: start;
}

@media (max-width: 1200px) {
    .dashboard-bottom-grid {
        grid-template-columns: 1fr;
    }
}

/* Clock Widget Specifics */
/* Clock Widget Specifics */
.btn-clock-action {
    background-color: transparent;
    color: var(--color-text-main);
    border: none;
    padding: 0;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 1rem;
    transition: color 0.2s;
}

.btn-clock-action:hover {
    color: var(--color-primary);
    background-color: transparent;
}

.btn-clock-action svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
    /* Make triangle solid */
}

/* Unified Profile Form Styles (Split Layout) - Professional Refinement */
.detail-row-split {
    display: flex;
    gap: 3rem;
    /* Widen gap for better separation */
    border-bottom: 1px solid #F3F4F6;
    padding-bottom: 2.5rem;
    margin-bottom: 2.5rem;
}

.detail-row-split:last-child {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 0;
}

.detail-left-col {
    width: 280px;
    flex-shrink: 0;
}

.detail-right-col {
    flex-grow: 1;
    max-width: 800px;
    /* Prevent overly wide forms */
}

.detail-icon-title {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    margin-bottom: 0.75rem;
    color: #F97316;
    /* Primary Brand Color */
    font-size: 1.15rem;
    font-weight: 600;
}

.detail-desc {
    color: #6B7280;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Card Styling for Professional Look */
.detail-card {
    background: #FFFFFF;
    /* Ensure white background against potential gray page bg */
    border-radius: 12px;
    /* Softer, modern corners */
    padding: 2rem;
    border: 1px solid #E5E7EB;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    /* Subtle depth */
}

/* Form Groups & Inputs */
.detail-form-group {
    margin-bottom: 1.5rem;
}

.detail-form-label {
    display: block;
    font-size: 0.9rem;
    color: var(--color-text-main);
    /* Darker text for readability */
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.detail-form-input,
.detail-form-select {
    width: 100%;
    padding: 0.75rem 1rem;
    /* More comfortable padding */
    border: 1px solid var(--color-border);
    border-radius: 6px;
    /* Slightly rounded inputs */
    font-size: 0.95rem;
    color: var(--color-text-main);
    background: var(--color-bg-white);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.detail-form-input:focus,
.detail-form-select:focus {
    outline: none;
    border-color: #F43F5E;
    /* Active brand color */
    box-shadow: 0 0 0 3px rgba(244, 63, 94, 0.1);
    /* Subtle ring */
}

.detail-form-input:disabled {
    background-color: var(--color-bg-subtle);
    color: var(--color-text-secondary);
}

/* Custom Search Input Wrapper */
.input-with-icon {
    position: relative;
}

.input-with-icon .detail-form-input {
    padding-left: 2.75rem;
}

.input-with-icon .icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #9CA3AF;
    pointer-events: none;
}

/* Settings Page Styles */
.settings-header {
    margin-bottom: 2rem;
}

/* Settings Header Layout */
.settings-header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.col-selector {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.col-btn {
    border: none;
    background: none;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--color-text-secondary);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    transition: all 0.2s;
}

.col-btn:hover {
    color: var(--color-primary);
    background-color: var(--color-bg-subtle);
}

.col-btn.active {
    color: var(--color-primary);
    font-weight: 700;
    background-color: transparent;
}

.settings-section {
    margin-bottom: 3rem;
}

.settings-section-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--color-text-main);
}

.settings-section-icon {
    color: var(--color-text-secondary);
    font-size: 1.25rem;
    opacity: 0.8;
}

.settings-grid {
    display: grid;
    grid-template-columns: repeat(var(--settings-cols, 4), 1fr);
    gap: 1.5rem;
}

@media (max-width: 1200px) {
    .settings-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .settings-grid {
        grid-template-columns: 1fr;
    }
}

.settings-card {
    background: var(--color-bg-white);
    border: 1px solid #F97316;
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    height: 100%;
    text-decoration: none;
}

.settings-card:hover {
    border-color: var(--color-primary);
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.15);
    /* Orange shadow */
    transform: translateY(-2px);
}

.settings-icon-box {
    margin-bottom: 1rem;
    font-size: 1.5rem;
    color: var(--color-primary);
    /* Orange */
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
}

.settings-card-title {
    font-weight: 600;
    font-size: 1rem;
    color: var(--color-text-main);
    margin-bottom: 0.5rem;
}

.settings-card-desc {
    font-size: 0.875rem;
    color: var(--color-text-secondary);
    line-height: 1.5;
}

/* Settings Sub-Header Standard */
.settings-sub-header {
    margin-bottom: 2rem;
}

.breadcrumb {
    color: var(--color-text-secondary);
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.breadcrumb a {
    color: var(--color-text-secondary);
    text-decoration: none;
}

.breadcrumb a:hover {
    color: var(--color-primary);
}

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

.breadcrumb .star-icon {
    font-size: 1rem;
    color: #9CA3AF;
    /* Gray-400 */
    cursor: pointer;
    margin-left: 0.25rem;
}

.breadcrumb .star-icon:hover {
    color: #FBBF24;
    /* Amber-400 */
}

.page-title-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.page-title-container h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--color-text-main);
    margin: 0;
}

.page-icon {
    color: var(--color-primary);
    display: flex;
    align-items: center;
}

.page-description {
    color: var(--color-text-secondary);
    font-size: 0.95rem;
    margin-top: 0;
    margin-bottom: 2rem;
}

/* Header Controls Edit */
.header-controls-edit {
    display: flex;
    /* overridden by inline style sometimes */
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.header-controls-edit h3 {
    margin: 0;
    font-size: 1rem;
    color: var(--color-primary);
    white-space: nowrap;
}

.widget-toggles {
    display: flex;
    gap: 0.5rem;
    margin-right: 1rem;
    font-size: 0.85rem;
    color: var(--color-text-secondary);
    flex-wrap: wrap;
    align-items: center;
}

.widget-toggles label {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    white-space: nowrap;
    cursor: pointer;
    background: var(--color-bg-white);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    border: 1px solid var(--color-border);
}

.btn-save-dashboard {
    background: var(--color-primary);
    color: white;
    border: none;
    padding: 0.5rem 1.0rem;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    margin-left: auto;
}

/* Responsive Dashboard Header */
@media (max-width: 1024px) {
    .dashboard-header {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }

    .greeting-section {
        width: 100%;
    }

    .app-switcher {
        margin-left: 0 !important;
        width: 100%;
        justify-content: center;
    }

    /* Stack the Edit Controls on Mobile */
    .header-controls-edit {
        flex-direction: column;
        align-items: stretch;
        background: #f9f9f9;
        padding: 1rem;
        border-radius: 8px;
        border: 1px solid #eee;
    }

    .widget-toggles {
        margin-right: 0;
        justify-content: flex-start;
        gap: 0.5rem;
    }

    .btn-save-dashboard {
        width: 100%;
        margin-left: 0;
        margin-top: 0.5rem;
    }
}

/* Premium Global Components */
.premium-header {
    background: #FFFFFF;
    padding: 1.5rem 2rem;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    border: 1px solid #E2E8F0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

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

.premium-header-icon {
    background: var(--color-primary);
    color: white;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.premium-header-icon svg {
    width: 24px;
    height: 24px;
}

.premium-header-info {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.premium-header-breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.75rem;
    color: #6B7280;
    margin-bottom: 0.15rem;
}

.premium-header-breadcrumb a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s;
}

.premium-header-breadcrumb a:hover {
    color: var(--color-primary);
}

.premium-header-breadcrumb span.separator {
    opacity: 0.4;
}

.premium-header-title {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    color: #0F172A;
    letter-spacing: -0.02em;
}

.premium-header-subtitle {
    margin: 0;
    font-size: 0.9rem;
    color: #64748B;
    font-weight: 500;
}

.btn-primary-action {
    background-color: var(--color-primary);
    color: white;
    padding: 0.6rem 1.25rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
    text-decoration: none;
}

.btn-primary-action:hover {
    opacity: 0.9;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.btn-primary-action svg {
    width: 18px;
    height: 18px;
}