/* ============================================
   SE REDESIGN — Professional Internal Tool
   ============================================ */

/* --- Phase 1: Layout Shell --- */

/* Override root variables */
body.redesign {
    font-family: 'Inter', 'Plus Jakarta Sans', sans-serif;
    background: #f8f9fa;
    overflow-x: hidden;
}

body.redesign :root {
    --sidebar-bg: #1e1e2e;
    --sidebar-width: 260px;
    --sidebar-collapsed: 68px;
    --topbar-height: 56px;
    --accent: #F7C948;
    --accent-light: rgba(247, 201, 72, 0.12);
    --bg: #f8f9fa;
    --card-bg: #ffffff;
    --border-color: #e5e7eb;
    --text-primary: #111827;
    --text-secondary: #6b7280;
    --text-muted: #9ca3af;
}

/* --- App Layout: Sidebar + Main --- */

body.redesign .app {
    display: none;
    min-height: 100vh;
    background: #f8f9fa;
}

body.redesign .app.active {
    display: flex;
}

/* Hide old header completely */
body.redesign .app > header {
    display: none !important;
}

/* --- Sidebar --- */

body.redesign .sidebar {
    width: 260px;
    background: #1e1e2e;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 100;
    display: flex;
    flex-direction: column;
    transition: width 0.2s ease;
    overflow: hidden;
}

body.redesign .sidebar.collapsed {
    width: 68px;
}

body.redesign .sidebar-header {
    padding: 20px 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    min-height: 72px;
}

body.redesign .sidebar-logo-wide {
    height: 44px;
    width: auto;
    max-width: 200px;
    object-fit: contain;
}

body.redesign .sidebar-logo-icon {
    display: none;
    width: 36px;
    height: 36px;
    object-fit: contain;
}

body.redesign .collapsed .sidebar-logo-wide {
    display: none;
}

body.redesign .collapsed .sidebar-logo-icon {
    display: block;
}

/* --- Sidebar Navigation --- */

body.redesign .sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 12px 0;
}

body.redesign .sidebar-nav-section {
    padding: 0 12px;
    margin-bottom: 8px;
}

body.redesign .sidebar-nav-label {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #4b5563;
    padding: 8px 8px 4px;
    white-space: nowrap;
    overflow: hidden;
}

body.redesign .collapsed .sidebar-nav-label {
    visibility: hidden;
    height: 12px;
    padding: 4px 0;
}

body.redesign .sidebar-nav .tab {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    margin: 1px 12px;
    border-radius: 7px;
    color: #a1a1aa;
    background: none;
    border: none;
    width: calc(100% - 24px);
    text-align: left;
    font-size: 13.5px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
    overflow: hidden;
    font-family: 'Inter', sans-serif;
    line-height: 1.4;
}

body.redesign .sidebar-nav .tab:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #d1d5db;
}

body.redesign .sidebar-nav .tab.active {
    background: rgba(247, 201, 72, 0.12);
    color: #F7C948;
}

body.redesign .sidebar-nav .tab .tab-icon {
    font-size: 16px;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

body.redesign .sidebar-nav .tab .tab-label {
    overflow: hidden;
    text-overflow: ellipsis;
}

body.redesign .collapsed .sidebar-nav .tab {
    justify-content: center;
    padding: 10px;
    margin: 1px 8px;
    width: calc(100% - 16px);
}

body.redesign .collapsed .sidebar-nav .tab .tab-label {
    display: none;
}

/* --- Collapsible Sections --- */

body.redesign .sidebar-section-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 12px;
    margin: 1px 12px;
    border-radius: 7px;
    color: #6b7280;
    background: none;
    border: none;
    width: calc(100% - 24px);
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    cursor: pointer;
    transition: all 0.15s ease;
    font-family: 'Inter', sans-serif;
}

body.redesign .sidebar-section-toggle:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #a1a1aa;
}

body.redesign .sidebar-section-toggle .section-icon {
    font-size: 14px;
    width: 20px;
    text-align: center;
}

body.redesign .sidebar-section-toggle .section-label {
    flex: 1;
}

body.redesign .sidebar-section-toggle .section-arrow {
    font-size: 10px;
    transition: transform 0.2s ease;
}

body.redesign .sidebar-section-toggle.open .section-arrow {
    transform: rotate(90deg);
}

body.redesign .sidebar-section-items {
    display: none;
    padding-left: 0;
}

body.redesign .sidebar-section-items.open {
    display: block;
}

body.redesign .collapsed .sidebar-section-toggle {
    justify-content: center;
    padding: 10px;
    margin: 1px 8px;
    width: calc(100% - 16px);
}

body.redesign .collapsed .sidebar-section-toggle .section-label,
body.redesign .collapsed .sidebar-section-toggle .section-arrow {
    display: none;
}

/* Sidebar bottom section pushed to bottom */
body.redesign .sidebar-nav-bottom {
    margin-top: auto;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 8px;
}

/* --- Floating Bella Chat Bubble --- */

/* Hide Bella on login screen — shown via JS after login */
body.redesign .bella-fab,
body.redesign .bella-fab-tooltip { display: none !important; }
body.redesign.logged-in .bella-fab { display: flex !important; }
body.redesign.logged-in .bella-fab-tooltip { display: block !important; }

body.redesign .bella-fab {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #1e1e2e;
    color: #F7C948;
    border: none;
    cursor: pointer;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2), 0 1px 4px rgba(0, 0, 0, 0.1);
    z-index: 90;
    transition: all 0.2s ease;
}

body.redesign .bella-fab:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

body.redesign .bella-fab-tooltip {
    position: fixed;
    bottom: 88px;
    right: 24px;
    background: #1e1e2e;
    color: #fff;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 500;
    z-index: 90;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
    white-space: nowrap;
}

body.redesign .bella-fab:hover + .bella-fab-tooltip {
    opacity: 1;
}

body.redesign .bella-chat-panel {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 440px;
    height: 580px;
    background: #fff;
    border-radius: 16px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    z-index: 91;
    display: none;
    flex-direction: column;
    overflow: hidden;
}

body.redesign .bella-chat-panel.open {
    display: flex;
}

body.redesign .bella-chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: #1e1e2e;
    color: #fff;
}

body.redesign .bella-chat-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

body.redesign .bella-chat-header-left .bella-avatar {
    font-size: 20px;
}

body.redesign .bella-chat-header-left .bella-name {
    font-size: 14px;
    font-weight: 600;
}

body.redesign .bella-chat-header-left .bella-status {
    font-size: 11px;
    color: #9ca3af;
}

body.redesign .bella-chat-close {
    background: none;
    border: none;
    color: #6b7280;
    cursor: pointer;
    font-size: 18px;
    padding: 4px;
    border-radius: 6px;
    width: auto !important;
    transition: color 0.15s;
}

body.redesign .bella-chat-close:hover {
    color: #fff;
}

body.redesign .bella-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}

body.redesign .bella-chat-msg {
    margin-bottom: 12px;
    max-width: 85%;
}

body.redesign .bella-chat-msg.assistant {
    margin-right: auto;
}

body.redesign .bella-chat-msg.user {
    margin-left: auto;
}

body.redesign .bella-chat-msg .bella-msg-bubble {
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 13px;
    line-height: 1.5;
}

body.redesign .bella-chat-msg.assistant .bella-msg-bubble {
    background: #f3f4f6;
    color: #111827;
    border-bottom-left-radius: 4px;
}

body.redesign .bella-chat-msg.user .bella-msg-bubble {
    background: #1e1e2e;
    color: #fff;
    border-bottom-right-radius: 4px;
}

body.redesign .bella-chat-input-area {
    padding: 12px 16px;
    border-top: 1px solid #e5e7eb;
    display: flex;
    gap: 8px;
}

body.redesign .bella-chat-input-area textarea {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    font-size: 13px;
    font-family: 'Inter', sans-serif;
    outline: none;
    resize: none;
    min-height: 40px;
    max-height: 120px;
    line-height: 1.4;
    overflow-y: auto;
}

body.redesign .bella-chat-input-area textarea:focus {
    border-color: #F7C948;
    box-shadow: 0 0 0 3px rgba(247, 201, 72, 0.1);
}

body.redesign .bella-chat-send {
    padding: 8px 14px;
    border-radius: 10px;
    border: none;
    background: #F7C948;
    color: #1a1a1a;
    font-weight: 600;
    cursor: pointer;
    font-size: 13px;
    font-family: 'Inter', sans-serif;
    transition: background 0.15s;
    width: auto !important;
}

body.redesign .bella-chat-send:hover {
    background: #e5b52e;
}

/* --- Operations Hub --- */

body.redesign .ops-hub-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 16px;
}

body.redesign .ops-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    background: #fff;
    color: #374151;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    font-family: 'Inter', sans-serif;
}

body.redesign .ops-tab:hover {
    border-color: #d1d5db;
    background: #f9fafb;
}

body.redesign .ops-tab.active {
    background: #1e1e2e;
    color: #fff;
    border-color: #1e1e2e;
}

body.redesign .ops-tab.active .ops-badge {
    opacity: 0.9;
}

body.redesign .ops-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.02em;
}

body.redesign .ops-badge.ai {
    background: #dbeafe;
    color: #1d4ed8;
}

body.redesign .ops-badge.full {
    background: #dcfce7;
    color: #15803d;
}

body.redesign .ops-tab.active .ops-badge.ai {
    background: rgba(59, 130, 246, 0.3);
    color: #93bbfd;
}

body.redesign .ops-tab.active .ops-badge.full {
    background: rgba(34, 197, 94, 0.3);
    color: #86efac;
}

/* Sub-tabs within Operations Hub */
body.redesign .ops-sub-tabs {
    display: flex;
    gap: 8px;
    padding: 12px 0;
    margin-bottom: 4px;
}

body.redesign .ops-sub-tab {
    padding: 7px 16px;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
    background: #fff;
    color: #374151;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    transition: all 0.15s;
}

body.redesign .ops-sub-tab:hover {
    background: #f3f4f6;
    border-color: #d1d5db;
}

body.redesign .ops-sub-tab.active {
    background: #F7C948;
    color: #1a1a1a;
    border-color: #F7C948;
    font-weight: 600;
}

body.redesign .ops-panel {
    display: none;
}

body.redesign .ops-panel.active {
    display: block;
}

body.redesign .ops-panel-title {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 4px;
}

body.redesign .ops-panel-title h2 {
    margin-bottom: 0;
}

body.redesign .ops-hub-header {
    margin-bottom: 0;
}

/* --- Sidebar Footer --- */

body.redesign .sidebar-footer {
    padding: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

body.redesign .sidebar-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 8px;
    border-radius: 7px;
    border: none;
    background: rgba(255, 255, 255, 0.04);
    color: #6b7280;
    cursor: pointer;
    font-size: 13px;
    font-family: 'Inter', sans-serif;
    transition: all 0.15s ease;
}

body.redesign .sidebar-toggle:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #a1a1aa;
}

body.redesign .collapsed .sidebar-toggle .toggle-label {
    display: none;
}

/* --- Top Bar --- */

body.redesign .top-bar {
    height: 56px;
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 50;
}

body.redesign .top-bar-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

body.redesign .top-bar-page-title {
    font-size: 15px;
    font-weight: 600;
    color: #111827;
}

body.redesign .top-bar-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

body.redesign .top-bar-right .notif-bell {
    position: relative;
    cursor: pointer;
    font-size: 18px;
    padding: 6px;
    border-radius: 8px;
    transition: background 0.15s;
}

body.redesign .top-bar-right .notif-bell:hover {
    background: #f3f4f6;
}

body.redesign .top-bar-right .user-name {
    font-size: 13px;
    font-weight: 500;
    color: #374151;
}

body.redesign .top-bar-right .logout-btn {
    padding: 6px 14px;
    border-radius: 7px;
    border: 1px solid #e5e7eb;
    background: #fff;
    color: #374151;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
    font-family: 'Inter', sans-serif;
}

body.redesign .top-bar-right .logout-btn:hover {
    background: #f9fafb;
    border-color: #d1d5db;
}

/* --- Main Content Area --- */

body.redesign .app-main {
    margin-left: 260px;
    flex: 1;
    min-height: 100vh;
    transition: margin-left 0.2s ease;
    display: flex;
    flex-direction: column;
}

body.redesign .sidebar.collapsed ~ .app-main {
    margin-left: 68px;
}

body.redesign .app-main > main {
    flex: 1;
    padding: 28px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

body.redesign .app-footer {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

/* Email inbox uses full width — no padding */
body.redesign #emailInbox.active {
    margin: -28px;
    padding: 0;
}

/* Hide old tabs row */
body.redesign .tabs {
    display: none !important;
}

/* --- Mobile hamburger (hidden on desktop) --- */

body.redesign .sidebar-mobile-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    background: #fff;
    cursor: pointer;
    font-size: 18px;
}

/* --- Sidebar Overlay (mobile) --- */

body.redesign .sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99;
}

/* ============================================
   Phase 2: Login Page
   ============================================ */

body.redesign .login-screen {
    background: #f8f9fa !important;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

body.redesign .login-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 48px 40px;
    max-width: 400px;
    width: 100%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 12px 32px rgba(0, 0, 0, 0.06);
    border: 1px solid #e5e7eb;
    border-top: none;
    text-align: center;
}

body.redesign .login-logo img {
    height: 80px;
    width: auto;
    max-width: 340px;
    margin-bottom: 8px;
}

body.redesign .login-subtitle {
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 32px;
    font-weight: 500;
}

body.redesign .login-card form input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    color: #111827;
    margin-bottom: 12px;
    transition: border-color 0.15s, box-shadow 0.15s;
    background: #fff;
}

body.redesign .login-card form input::placeholder {
    color: #9ca3af;
}

body.redesign .login-card form input:focus {
    outline: none;
    border-color: #F7C948;
    box-shadow: 0 0 0 3px rgba(247, 201, 72, 0.12);
}

body.redesign .login-card form button {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 10px;
    background: #1e1e2e;
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    transition: all 0.15s;
    margin-top: 4px;
    letter-spacing: 0;
    text-transform: none;
}

body.redesign .login-card form button:hover {
    background: #2d2d3d;
}

body.redesign .password-wrapper {
    position: relative;
    margin-bottom: 12px;
}

body.redesign .password-wrapper input {
    padding-right: 44px !important;
    margin-bottom: 0 !important;
}

body.redesign .password-toggle {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: #f3f4f6 !important;
    border: 1px solid #e5e7eb !important;
    color: #6b7280;
    cursor: pointer;
    padding: 5px;
    border-radius: 6px;
    width: 32px !important;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    transition: all 0.15s;
}

body.redesign .password-toggle:hover {
    color: #111827;
    background: #e5e7eb !important;
    border-color: #d1d5db !important;
}

body.redesign .login-error {
    color: #dc2626;
    font-size: 13px;
    margin-top: 12px;
}

/* ============================================
   Calendar Component
   ============================================ */

body.redesign .cal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 8px;
}

body.redesign .cal-header h2 {
    margin-bottom: 0;
}

body.redesign .cal-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

body.redesign .cal-month-label {
    font-size: 15px;
    font-weight: 600;
    color: #111827;
    min-width: 140px;
    text-align: center;
}

body.redesign .cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    margin-bottom: 4px;
}

body.redesign .cal-grid .cal-day-header {
    text-align: center;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6b7280;
    padding: 8px 4px;
}

body.redesign .cal-grid .cal-day {
    text-align: center;
    padding: 10px 4px;
    font-size: 13px;
    border-radius: 8px;
    cursor: pointer;
    position: relative;
    color: #374151;
    transition: all 0.1s ease;
    min-height: 42px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

body.redesign .cal-grid .cal-day:hover {
    background: #f3f4f6;
}

body.redesign .cal-grid .cal-day.other-month {
    color: #d1d5db;
}

body.redesign .cal-grid .cal-day.today {
    background: #F7C948;
    color: #1a1a1a;
    font-weight: 700;
    border-radius: 8px;
}

body.redesign .cal-grid .cal-day.selected {
    background: #1e1e2e;
    color: #fff;
    font-weight: 600;
}

body.redesign .cal-grid .cal-day.today.selected {
    background: #1e1e2e;
    color: #F7C948;
}

body.redesign .cal-grid .cal-day .cal-dot-row {
    display: flex;
    gap: 2px;
    margin-top: 2px;
    justify-content: center;
}

body.redesign .cal-grid .cal-day .cal-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #F7C948;
}

body.redesign .cal-grid .cal-day .cal-dot.company {
    background: #6366f1;
}

body.redesign .cal-grid .cal-day .cal-dot.personal {
    background: #F7C948;
}

/* Day detail panel */
body.redesign .cal-day-detail {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #e5e7eb;
}

body.redesign .cal-day-detail-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

body.redesign .cal-day-detail-header h3 {
    font-size: 14px;
    font-weight: 600;
    color: #111827;
}

body.redesign .cal-event-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    background: #f9fafb;
    border: 1px solid #f3f4f6;
    margin-bottom: 6px;
}

body.redesign .cal-event-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-top: 5px;
    flex-shrink: 0;
}

body.redesign .cal-event-dot.reminder { background: #F7C948; }
body.redesign .cal-event-dot.meeting { background: #3b82f6; }
body.redesign .cal-event-dot.deadline { background: #ef4444; }
body.redesign .cal-event-dot.other { background: #8b5cf6; }
body.redesign .cal-event-dot.company { background: #6366f1; }

body.redesign .cal-event-info {
    flex: 1;
    min-width: 0;
}

body.redesign .cal-event-title {
    font-size: 13px;
    font-weight: 500;
    color: #111827;
}

body.redesign .cal-event-time {
    font-size: 12px;
    color: #6b7280;
    margin-top: 1px;
}

body.redesign .cal-event-delete {
    background: none;
    border: none;
    color: #d1d5db;
    cursor: pointer;
    font-size: 14px;
    padding: 2px 4px;
    border-radius: 4px;
    transition: all 0.15s;
    width: auto !important;
}

body.redesign .cal-event-delete:hover {
    color: #ef4444;
    background: #fee2e2 !important;
}

body.redesign .cal-no-events {
    font-size: 13px;
    color: #9ca3af;
    padding: 8px 0;
}

/* ============================================
   Phase 3: Components
   ============================================ */

/* --- Cards --- */

body.redesign .card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-left: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

body.redesign .card h2 {
    font-size: 16px;
    font-weight: 600;
    color: #111827;
    margin-bottom: 4px;
}

body.redesign .card-info {
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 16px;
}

/* --- Buttons --- */

body.redesign .btn {
    border-radius: 8px;
    font-weight: 600;
    font-size: 13px;
    padding: 9px 18px;
    cursor: pointer;
    transition: all 0.15s ease;
    font-family: 'Inter', sans-serif;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

body.redesign .btn-primary {
    background: #F7C948;
    color: #1a1a1a;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

body.redesign .btn-primary:hover {
    background: #e5b52e;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

body.redesign .btn-secondary {
    background: #ffffff;
    color: #374151;
    border: 1px solid #d1d5db;
}

body.redesign .btn-secondary:hover {
    background: #f9fafb;
    border-color: #9ca3af;
}

body.redesign .btn-danger {
    background: #fee2e2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

body.redesign .btn-danger:hover {
    background: #fecaca;
}

body.redesign .btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

/* --- Forms --- */

body.redesign .form-group label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #374151;
    margin-bottom: 6px;
}

body.redesign .form-group input,
body.redesign .form-group select,
body.redesign .form-group textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    color: #111827;
    background: #fff;
    transition: border-color 0.15s, box-shadow 0.15s;
}

body.redesign .form-group input:focus,
body.redesign .form-group select:focus,
body.redesign .form-group textarea:focus {
    outline: none;
    border-color: #F7C948;
    box-shadow: 0 0 0 3px rgba(247, 201, 72, 0.1);
}

body.redesign .form-group input::placeholder,
body.redesign .form-group textarea::placeholder {
    color: #9ca3af;
}

/* --- Tables --- */

body.redesign .data-table {
    width: 100%;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    border-collapse: separate;
    border-spacing: 0;
    overflow: hidden;
}

body.redesign .data-table th {
    background: #f9fafb;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6b7280;
    padding: 10px 14px;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

body.redesign .data-table td {
    padding: 12px 14px;
    font-size: 13px;
    color: #374151;
    border-bottom: 1px solid #f3f4f6;
}

body.redesign .data-table tr:last-child td {
    border-bottom: none;
}

body.redesign .data-table tr:hover td {
    background: #f9fafb;
}

/* --- Badges --- */

body.redesign .badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 500;
    padding: 2px 10px;
    line-height: 1.6;
}

body.redesign .badge-ok {
    background: #dcfce7;
    color: #15803d;
}

body.redesign .badge-warning {
    background: #fef3c7;
    color: #a16207;
}

body.redesign .badge-danger {
    background: #fee2e2;
    color: #dc2626;
}

/* --- Modals --- */

body.redesign .modal-overlay {
    background: rgba(0, 0, 0, 0.5) !important;
    backdrop-filter: blur(4px);
}

body.redesign .modal {
    border-radius: 14px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    border: 1px solid #e5e7eb;
    overflow: hidden;
}

body.redesign .modal-header {
    background: #ffffff;
    color: #111827;
    border-bottom: 1px solid #e5e7eb;
    padding: 20px 24px;
    text-align: left;
}

body.redesign .modal-header h2,
body.redesign .modal-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: #111827;
}

body.redesign .modal-body {
    padding: 24px;
}

body.redesign .modal-footer {
    padding: 16px 24px;
    border-top: 1px solid #e5e7eb;
    background: #f9fafb;
}

/* --- Chat / Output Areas --- */

body.redesign .output-area {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 20px;
}

body.redesign .chat-msg.assistant {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
}

body.redesign .chat-msg.user {
    background: #F7C948;
    color: #1a1a1a;
    border-radius: 10px;
}

/* --- Footer --- */

body.redesign .app-footer {
    display: none;
}

/* --- Loading Spinner --- */

body.redesign .spinner {
    border: 3px solid #e5e7eb;
    border-top-color: #F7C948;
}

/* --- Notification Badge --- */

body.redesign .notif-badge {
    background: #ef4444;
    color: #fff;
    font-size: 10px;
    border-radius: 999px;
    padding: 1px 5px;
    position: absolute;
    top: 0;
    right: 0;
}

/* --- Scrollbar in sidebar --- */

body.redesign .sidebar-nav::-webkit-scrollbar {
    width: 4px;
}

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

body.redesign .sidebar-nav::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

/* ============================================
   Phase 4: Responsive
   ============================================ */

/* Tablet */
@media (max-width: 1024px) {
    body.redesign .sidebar {
        width: 68px;
    }
    body.redesign .sidebar .sidebar-logo-wide {
        display: none;
    }
    body.redesign .sidebar .sidebar-logo-icon {
        display: block;
    }
    body.redesign .sidebar-nav-label,
    body.redesign .sidebar-toggle .toggle-label,
    body.redesign .sidebar-nav .tab .tab-label {
        display: none;
    }
    body.redesign .sidebar-nav .tab {
        justify-content: center;
        padding: 10px;
        margin: 1px 8px;
        width: calc(100% - 16px);
    }
    body.redesign .app-main {
        margin-left: 68px;
    }
}

/* Mobile */
@media (max-width: 768px) {
    body.redesign .sidebar {
        width: 280px;
        transform: translateX(-100%);
        z-index: 200;
    }
    body.redesign .sidebar.mobile-open {
        transform: translateX(0);
    }
    body.redesign .sidebar.mobile-open .sidebar-title,
    body.redesign .sidebar.mobile-open .sidebar-subtitle,
    body.redesign .sidebar.mobile-open .sidebar-nav-label,
    body.redesign .sidebar.mobile-open .sidebar-toggle .toggle-label,
    body.redesign .sidebar.mobile-open .sidebar-nav .tab .tab-label {
        display: block;
    }
    body.redesign .sidebar.mobile-open .sidebar-nav .tab {
        justify-content: flex-start;
        padding: 9px 12px;
        margin: 1px 12px;
        width: calc(100% - 24px);
    }
    body.redesign .app-main {
        margin-left: 0;
    }
    body.redesign .app-main > main {
        padding: 16px;
    }
    body.redesign .sidebar-mobile-toggle {
        display: flex;
    }
    body.redesign .sidebar-overlay.active {
        display: block;
    }
    /* Hide old mobile menu */
    .se-mobile-menu-btn {
        display: none !important;
    }
    .se-mobile-drawer {
        display: none !important;
    }
    .se-mobile-overlay {
        display: none !important;
    }
}
