/* SAKE JIRA — Design System & Main Stylesheet */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
    /* Palette Tokens */
    --sake-dark: #2C211C;
    --sake-deep: #4A3428;
    --sake-medium: #6B4F3F;
    --sake-muted: #8B6F5A;
    --sake-sand: #B9A28F;
    --sake-soft-sand: #D8C8B8;
    --sake-warm-cream: #EEE5DA;
    --sake-off-white: #F7F3ED;
    --sake-pure-cream: #FCFAF7;
    --sake-surface: #FFFFFF;

    /* Semantic Mappings */
    --bg-app: #F7F3ED;
    --bg-surface: #FCFAF7;
    --bg-card: #FFFFFF;
    --text-primary: #2C211C;
    --text-secondary: #6B4F3F;
    --text-muted: #8B6F5A;
    --text-light: #B9A28F;

    --border-color: rgba(139, 111, 90, 0.20);
    --border-subtle: rgba(139, 111, 90, 0.12);

    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 10px;
    --radius-pill: 9999px;

    --shadow-xs: 0 1px 2px rgba(44, 33, 28, 0.03);
    --shadow-sm: 0 2px 6px rgba(44, 33, 28, 0.04), 0 1px 2px rgba(44, 33, 28, 0.02);
    --shadow-md: 0 6px 18px rgba(44, 33, 28, 0.06), 0 2px 4px rgba(44, 33, 28, 0.03);
    --shadow-lg: 0 12px 30px rgba(44, 33, 28, 0.08);

    --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;

    --sidebar-width: 250px;
    --header-height: 64px;
}

/* Global Reset */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-family: var(--font-sans);
    font-size: 15px;
    color: var(--text-primary);
    background-color: var(--bg-app);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    background-color: var(--bg-app);
    color: var(--text-primary);
    line-height: 1.5;
    min-height: 100vh;
}

/* Links & Typography */
a {
    color: inherit;
    text-decoration: none;
    transition: color 0.15s ease;
}

h1, h2, h3, h4, h5 {
    color: var(--sake-dark);
    font-weight: 600;
    line-height: 1.25;
}

h1 { font-size: 1.6rem; letter-spacing: -0.02em; }
h2 { font-size: 1.3rem; letter-spacing: -0.015em; }
h3 { font-size: 1.05rem; letter-spacing: -0.01em; }
p { font-size: 0.95rem; }

/* Layout Grid */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.app-sidebar {
    width: var(--sidebar-width);
    background: var(--sake-dark);
    color: var(--sake-warm-cream);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 100;
    border-right: 1px solid rgba(0, 0, 0, 0.15);
}

.sidebar-header {
    height: var(--header-height);
    display: flex;
    align-items: center;
    padding: 0 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.brand-monogram {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: var(--sake-pure-cream);
}

.brand-icon {
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, var(--sake-medium), var(--sake-sand));
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--sake-dark);
    font-weight: 800;
    font-size: 0.85rem;
}

.sidebar-team-badge {
    margin: 1rem 1.25rem 0.5rem;
    padding: 0.6rem 0.8rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.user-avatar-sm {
    width: 28px;
    height: 28px;
    background: var(--sake-medium);
    color: var(--sake-pure-cream);
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.team-user-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--sake-pure-cream);
    white-space: nowrap;
    text-overflow: ellipsis;
}

.team-badge-tag {
    font-size: 0.7rem;
    color: var(--sake-sand);
    letter-spacing: 0.02em;
}

.sidebar-nav {
    flex: 1;
    padding: 1rem 0.85rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    overflow-y: auto;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.65rem 0.85rem;
    color: var(--sake-soft-sand);
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: var(--radius-md);
    transition: all 0.15s ease;
}

.nav-link svg {
    width: 18px;
    height: 18px;
    stroke-width: 2;
    opacity: 0.85;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.07);
    color: var(--sake-pure-cream);
}

.nav-link.active {
    background: var(--sake-deep);
    color: var(--sake-pure-cream);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.nav-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
    margin: 0.85rem 0.5rem;
}

.sidebar-footer {
    padding: 1rem 0.85rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.logout-form button {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.65rem 0.85rem;
    background: transparent;
    border: none;
    color: #e5989b;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    border-radius: var(--radius-md);
    transition: background 0.15s ease;
    text-align: left;
}

.logout-form button svg {
    width: 18px;
    height: 18px;
    min-width: 18px;
    min-height: 18px;
    max-width: 18px;
    max-height: 18px;
    flex-shrink: 0;
    stroke-width: 2;
}

.logout-form button:hover {
    background: rgba(229, 152, 155, 0.12);
}

/* Main Content Area */
.app-main {
    flex: 1;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    min-width: 0;
}

/* Header */
.app-header {
    height: var(--header-height);
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    position: sticky;
    top: 0;
    z-index: 90;
    backdrop-filter: blur(8px);
}

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

.header-title-box h1 {
    font-size: 1.25rem;
    font-weight: 600;
}

.header-subtitle {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Primary and Outline Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.55rem 1.1rem;
    font-family: inherit;
    font-size: 0.88rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.15s ease;
    text-decoration: none;
    line-height: 1.25;
}

.btn-primary {
    background: var(--sake-dark);
    color: var(--sake-pure-cream);
    border-color: var(--sake-dark);
}

.btn-primary:hover {
    background: var(--sake-deep);
    border-color: var(--sake-deep);
    box-shadow: var(--shadow-sm);
    color: #FFFFFF;
}

.btn-secondary {
    background: var(--sake-warm-cream);
    color: var(--sake-dark);
    border-color: var(--sake-soft-sand);
}

.btn-secondary:hover {
    background: var(--sake-soft-sand);
}

.btn-outline {
    background: transparent;
    color: var(--sake-medium);
    border-color: var(--border-color);
}

.btn-outline:hover {
    background: var(--sake-warm-cream);
    color: var(--sake-dark);
}

.btn-sm {
    padding: 0.35rem 0.75rem;
    font-size: 0.8rem;
}

.btn svg {
    width: 16px;
    height: 16px;
}

/* Content Wrapper */
.content-body {
    padding: 2rem;
    flex: 1;
}

/* Flash Messages */
.flash-message {
    padding: 0.85rem 1.25rem;
    margin-bottom: 1.5rem;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow-xs);
    animation: fadeIn 0.25s ease-out;
}

.flash-success {
    background: #e8f5e9;
    color: #1e4620;
    border: 1px solid #c8e6c9;
}

.flash-error {
    background: #fbe9e7;
    color: #bf360c;
    border: 1px solid #ffccbc;
}

.flash-info {
    background: #eefeef;
    color: #2c4a3e;
    border: 1px solid var(--border-color);
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.6rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    letter-spacing: 0.01em;
    line-height: 1.2;
}

/* Priority Badges */
.badge-priority-critical {
    background: #fde8e8;
    color: #9e2a2b;
    border: 1px solid #f8b4b4;
}

.badge-priority-high {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}

.badge-priority-normal {
    background: var(--sake-warm-cream);
    color: var(--sake-deep);
    border: 1px solid var(--sake-soft-sand);
}

.badge-priority-low {
    background: #f3f4f6;
    color: var(--sake-muted);
    border: 1px solid #e5e7eb;
}

/* Status Badges */
.badge-status-todo {
    background: #f5f2ed;
    color: #6b4f3f;
    border: 1px solid #d8c8b8;
}

.badge-status-progress {
    background: #e0f2fe;
    color: #0369a1;
    border: 1px solid #bae6fd;
}

.badge-status-waiting {
    background: #fef9c3;
    color: #854d0e;
    border: 1px solid #fef08a;
}

.badge-status-done {
    background: #dcfce7;
    color: #15803d;
    border: 1px solid #bbf7d0;
}

/* Activity Badges */
.act-badge {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    font-size: 0.72rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
}

.act-badge-created { background: #e0f2fe; color: #075985; }
.act-badge-status { background: #fef3c7; color: #92400e; }
.act-badge-priority { background: #fce7f3; color: #9d174d; }
.act-badge-note { background: #e8f5e9; color: #166534; }
.act-badge-updated { background: #f3f4f6; color: #374151; }

/* Dashboard Cards & Layout */
.dashboard-metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.metric-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    box-shadow: var(--shadow-xs);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

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

.metric-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--sake-medium);
}

.metric-card.metric-total::before { background: var(--sake-dark); }
.metric-card.metric-todo::before { background: var(--sake-muted); }
.metric-card.metric-progress::before { background: #0284c7; }
.metric-card.metric-waiting::before { background: #ca8a04; }
.metric-card.metric-done::before { background: #16a34a; }

.metric-label {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.metric-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--sake-dark);
    line-height: 1;
}

.dashboard-split-view {
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: 1.75rem;
}

@media (max-width: 1024px) {
    .dashboard-split-view {
        grid-template-columns: 1fr;
    }
}

.panel {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-xs);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.panel-header {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-surface);
}

.panel-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--sake-dark);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.panel-body {
    padding: 1.25rem 1.5rem;
    flex: 1;
}

/* Filter Bar */
.filter-bar {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
    box-shadow: var(--shadow-xs);
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-group label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
}

.form-control, .form-select {
    padding: 0.5rem 0.75rem;
    font-family: inherit;
    font-size: 0.88rem;
    color: var(--sake-dark);
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-control:focus, .form-select:focus {
    border-color: var(--sake-medium);
    box-shadow: 0 0 0 3px rgba(107, 79, 63, 0.12);
    background: #FFFFFF;
}

.search-input {
    min-width: 220px;
}

/* Forms */
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
}

.form-col-span-2 {
    grid-column: span 2;
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.form-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--sake-dark);
}

.form-label .required {
    color: #b91c1c;
}

.form-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.form-actions {
    margin-top: 2rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
}

.task-detail-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.75rem;
    align-items: start;
}

@media (max-width: 860px) {
    .task-detail-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

    .form-actions {
        flex-direction: column-reverse;
        gap: 0.6rem;
    }

    .form-actions .btn {
        width: 100%;
        min-height: 46px;
    }
}

textarea.form-control {
    min-height: 100px;
    resize: vertical;
}

/* Table Style */
.table-responsive {
    width: 100%;
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.88rem;
}

.data-table th {
    background: var(--bg-surface);
    padding: 0.75rem 1rem;
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-bottom: 1px solid var(--border-color);
}

.data-table td {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--border-subtle);
    color: var(--text-primary);
    vertical-align: middle;
}

.data-table tr:hover td {
    background: rgba(247, 243, 237, 0.6);
}

.table-task-title {
    font-weight: 600;
    color: var(--sake-dark);
}

.table-task-title:hover {
    color: var(--sake-medium);
}

/* Activity Feed */
.activity-stream {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    position: relative;
}

.activity-stream::before {
    content: '';
    position: absolute;
    top: 10px;
    bottom: 10px;
    left: 17px;
    width: 2px;
    background: var(--border-color);
}

.activity-item {
    display: flex;
    gap: 1rem;
    position: relative;
    z-index: 1;
}

.activity-avatar {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    background: var(--sake-deep);
    color: var(--sake-pure-cream);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.8rem;
    flex-shrink: 0;
    box-shadow: 0 0 0 3px var(--bg-card);
}

.activity-content-box {
    flex: 1;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.85rem 1rem;
}

.activity-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.4rem;
    font-size: 0.8rem;
}

.activity-author {
    font-weight: 600;
    color: var(--sake-dark);
}

.activity-time {
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 0.75rem;
}

.activity-text {
    font-size: 0.88rem;
    color: var(--text-secondary);
    white-space: pre-wrap;
    word-break: break-word;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Mobile Responsive */
.mobile-nav-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--sake-dark);
    cursor: pointer;
    padding: 0.5rem;
    min-height: 44px;
    min-width: 44px;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
}

.sidebar-close-btn {
    display: none;
    background: none;
    border: none;
    color: var(--sake-warm-cream);
    cursor: pointer;
    padding: 0.4rem;
    margin-left: auto;
    border-radius: var(--radius-sm);
    min-height: 40px;
    min-width: 40px;
    align-items: center;
    justify-content: center;
}

.sidebar-backdrop {
    display: none;
}

.mobile-bottom-bar {
    display: none;
}

/* ==========================================================================
   ENHANCED SAKE JIRA DASHBOARD STYLES (Base)
   ========================================================================== */

.dash-hero {
    background: linear-gradient(135deg, #FFFFFF 0%, var(--bg-surface) 100%);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem 1.75rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow-sm);
    flex-wrap: wrap;
    gap: 1rem;
}

.dash-hero-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--sake-dark);
    margin-bottom: 0.25rem;
    letter-spacing: -0.015em;
}

.dash-hero-desc {
    font-size: 0.88rem;
    color: var(--text-secondary);
}

.dash-hero-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Horizontal Status Strip */
.status-strip {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    background: #FFFFFF;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    margin-bottom: 1.75rem;
    overflow: hidden;
    box-shadow: var(--shadow-xs);
}

.status-strip-item {
    padding: 1rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    border-right: 1px solid var(--border-subtle);
    text-decoration: none;
    transition: background 0.15s ease;
}

.status-strip-item:last-child {
    border-right: none;
}

.status-strip-item:hover {
    background: rgba(247, 243, 237, 0.7);
}

.strip-label {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
}

.strip-count {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--sake-dark);
    line-height: 1;
}

.strip-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.dot-total { background: var(--sake-dark); }
.dot-todo { background: var(--sake-muted); }
.dot-progress { background: #0284c7; }
.dot-waiting { background: #ca8a04; }
.dot-done { background: #16a34a; }

/* Dashboard Tabs */
.dash-tabs {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.75rem;
    flex-wrap: wrap;
}

.dash-tab-btn {
    padding: 0.45rem 0.95rem;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: var(--radius-pill);
    border: 1px solid var(--border-subtle);
    color: var(--text-muted);
    background: var(--bg-surface);
    transition: all 0.15s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.dash-tab-btn:hover {
    background: var(--sake-warm-cream);
    color: var(--sake-dark);
}

.dash-tab-btn.active {
    background: var(--sake-dark);
    border-color: var(--sake-dark);
    color: var(--sake-pure-cream);
    box-shadow: var(--shadow-xs);
}

/* Task Item Card */
.dash-task-card {
    background: #FFFFFF;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.1rem 1.25rem;
    margin-bottom: 0.85rem;
    box-shadow: var(--shadow-xs);
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.dash-task-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
    border-color: var(--sake-sand);
}

.dash-task-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.dash-task-tags {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.dash-task-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--sake-dark);
    line-height: 1.35;
    word-break: break-word;
    overflow-wrap: anywhere;
}

.dash-task-title a {
    color: inherit;
    text-decoration: none;
}

.dash-task-title a:hover {
    color: var(--sake-medium);
}

.dash-task-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 0.65rem;
    border-top: 1px solid var(--border-subtle);
    font-size: 0.78rem;
    color: var(--text-muted);
    flex-wrap: wrap;
    gap: 0.5rem;
}

.dash-quick-status {
    padding: 0.25rem 0.55rem;
    font-size: 0.75rem;
    font-family: inherit;
    font-weight: 600;
    color: var(--sake-dark);
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    cursor: pointer;
    outline: none;
}

.dash-quick-status:hover {
    border-color: var(--sake-medium);
}

/* Activity Note Callout */
.activity-note-callout {
    background: rgba(238, 229, 218, 0.4);
    border-left: 3px solid var(--sake-medium);
    padding: 0.65rem 0.85rem;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    margin-top: 0.4rem;
    font-size: 0.85rem;
    color: var(--text-primary);
    line-height: 1.45;
    word-break: break-word;
    overflow-wrap: anywhere;
}

/* ==========================================================================
   TASK DETAIL HELPERS & URL BOX
   ========================================================================== */
.task-web-url-box {
    margin-bottom: 1.25rem;
    padding: 0.75rem 1rem;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
    min-width: 0;
}

.task-web-url-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
    flex: 1 1 200px;
}

.url-link-text {
    font-family: var(--font-mono);
    font-size: 0.82rem;
    color: var(--text-secondary);
    word-break: break-all;
    overflow-wrap: anywhere;
}

/* Settings System Info Grid */
.settings-sys-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    font-size: 0.85rem;
}

/* ==========================================================================
   MOBILE TASK CARDS (For /tasks/list on screens <= 768px)
   ========================================================================== */
.mobile-task-list {
    display: none;
}

.mobile-task-card {
    background: #FFFFFF;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.95rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    box-shadow: var(--shadow-xs);
    transition: transform 0.12s ease, border-color 0.12s ease;
    text-decoration: none;
    color: inherit;
    -webkit-tap-highlight-color: transparent;
}

.mobile-task-card:active {
    transform: scale(0.985);
    background: var(--bg-surface);
}

.mobile-task-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.mobile-task-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--sake-dark);
    line-height: 1.35;
    word-break: break-word;
    overflow-wrap: anywhere;
}

.mobile-task-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 0.5rem;
    border-top: 1px solid var(--border-subtle);
    font-size: 0.76rem;
    color: var(--text-muted);
}

.mobile-task-customer {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-weight: 500;
}

/* ==========================================================================
   UNIVERSAL QUICK TASK MODAL / BOTTOM SHEET
   ========================================================================== */
.quick-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(44, 33, 28, 0.55);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 2000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    box-sizing: border-box;
}

.quick-modal-backdrop.open {
    opacity: 1;
    pointer-events: auto;
}

.quick-modal-dialog {
    background: #FFFFFF;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: 0 16px 40px rgba(44, 33, 28, 0.2);
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    transform: scale(0.96) translateY(12px);
    transition: transform 0.24s cubic-bezier(0.16, 1, 0.3, 1);
    -webkit-overflow-scrolling: touch;
}

.quick-modal-backdrop.open .quick-modal-dialog {
    transform: scale(1) translateY(0);
}

.quick-modal-handle {
    display: none;
    width: 36px;
    height: 4px;
    border-radius: 2px;
    background: var(--border-color);
    margin: 0.6rem auto 0.2rem;
}

.quick-modal-header {
    padding: 1.1rem 1.35rem 0.85rem;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    border-bottom: 1px solid var(--border-subtle);
}

.quick-modal-title-wrap {
    min-width: 0;
    flex: 1;
}

.quick-modal-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.35rem;
    flex-wrap: wrap;
}

.quick-modal-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--sake-dark);
    margin: 0;
    line-height: 1.3;
    word-break: break-word;
}

.quick-modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.3rem;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    min-height: 36px;
}

.quick-modal-close:hover {
    color: var(--sake-dark);
    background: var(--bg-surface);
}

.quick-modal-body {
    padding: 1.1rem 1.35rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.quick-section-title {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.quick-pills-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.4rem;
}

.quick-pill-btn {
    padding: 0.55rem 0.4rem;
    font-size: 0.76rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    background: var(--bg-surface);
    color: var(--text-secondary);
    cursor: pointer;
    text-align: center;
    transition: all 0.15s ease;
    touch-action: manipulation;
    min-height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.quick-pill-btn:hover {
    border-color: var(--sake-medium);
    color: var(--sake-dark);
}

.quick-pill-btn.active {
    background: var(--sake-dark);
    color: var(--sake-pure-cream);
    border-color: var(--sake-dark);
    box-shadow: var(--shadow-xs);
}

.quick-note-box textarea {
    width: 100%;
    min-height: 68px;
    resize: vertical;
    font-size: 0.85rem;
    overflow-y: auto !important;
    touch-action: pan-y !important;
    overscroll-behavior: contain !important;
}

.quick-modal-dialog,
.quick-modal-body,
.completion-modal-dialog,
textarea,
textarea.form-control,
.completion-textarea {
    touch-action: pan-y !important;
    overscroll-behavior: contain !important;
    -webkit-overflow-scrolling: touch !important;
}

textarea,
textarea.form-control {
    overflow-y: auto !important;
}

/* Universal Task Completion Modal */
.completion-modal-backdrop {
    z-index: 2050;
}

.completion-modal-dialog {
    max-width: 480px;
}

.completion-info-banner {
    background: linear-gradient(135deg, #ebfbee 0%, #e6fcf5 100%);
    border: 1px solid #b2f2bb;
    border-radius: var(--radius-md);
    padding: 0.9rem 1.1rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.completion-banner-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #2b8a3e;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(43, 138, 62, 0.25);
}

.completion-banner-text {
    flex: 1;
    line-height: 1.4;
}

.completion-banner-text strong {
    display: block;
    font-size: 0.88rem;
    color: #1e1e1e;
    margin-bottom: 0.2rem;
}

.completion-banner-text p {
    margin: 0;
    color: #495057;
    font-size: 0.8rem;
}

.completion-textarea {
    min-height: 84px !important;
    resize: vertical;
    font-size: 0.88rem;
    line-height: 1.45;
}

.quick-modal-footer {
    padding: 0.85rem 1.35rem 1.1rem;
    border-top: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.quick-modal-footer .btn {
    flex: 1;
    justify-content: center;
}

/* ==========================================================================
   MOBILE RESPONSIVE SYSTEM (Media Queries <= 860px)
   ========================================================================== */
@media (max-width: 860px) {
    /* Safe Mobile Viewport Setup: No horizontal wobble, native momentum scroll */
    html {
        -webkit-text-size-adjust: 100%;
        scroll-behavior: smooth;
    }

    body {
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: hidden !important;
        -webkit-overflow-scrolling: touch;
    }

    body.drawer-locked {
        overflow: hidden !important;
    }

    body.drawer-locked .quick-modal-backdrop,
    body.drawer-locked .quick-modal-dialog,
    body.drawer-locked .quick-modal-body,
    body.drawer-locked .completion-modal-dialog,
    body.drawer-locked .app-sidebar,
    body.drawer-locked textarea,
    body.drawer-locked input,
    body.drawer-locked select {
        touch-action: pan-y !important;
    }

    .app-container {
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: hidden !important;
    }

    .app-main {
        margin-left: 0 !important;
        min-width: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: hidden;
    }

    /* Mobile Drawer (Z-Index: 1050) */
    .app-sidebar {
        position: fixed;
        top: 0;
        bottom: 0;
        left: 0;
        width: min(300px, 84vw);
        z-index: 1050 !important;
        transform: translate3d(-100%, 0, 0);
        -webkit-transform: translate3d(-100%, 0, 0);
        -webkit-backface-visibility: hidden;
        backface-visibility: hidden;
        will-change: transform;
        transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), -webkit-transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
        box-shadow: 0 0 40px rgba(0, 0, 0, 0.35);
        -webkit-overflow-scrolling: touch;
        touch-action: pan-y;
    }

    .app-sidebar.sidebar-open {
        transform: translate3d(0, 0, 0) !important;
        -webkit-transform: translate3d(0, 0, 0) !important;
    }

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

    /* Backdrop Overlay (Z-Index: 1040) */
    .sidebar-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(44, 33, 28, 0.5);
        backdrop-filter: blur(5px);
        -webkit-backdrop-filter: blur(5px);
        z-index: 1040 !important;
        opacity: 0;
        pointer-events: none;
        transform: translate3d(0, 0, 0);
        -webkit-transform: translate3d(0, 0, 0);
        -webkit-backface-visibility: hidden;
        backface-visibility: hidden;
        transition: opacity 0.25s ease;
        touch-action: none;
    }

    .sidebar-backdrop.active {
        opacity: 1;
        pointer-events: auto;
    }

    /* Header Ergonomics on Mobile (Z-Index: 800) */
    .app-header {
        padding: 0 0.85rem;
        height: 54px;
        z-index: 800;
        gap: 0.5rem;
    }

    .header-left {
        gap: 0.5rem;
        min-width: 0;
        flex: 1;
    }

    .header-title-box {
        min-width: 0;
        overflow: hidden;
    }

    .header-title-box h1 {
        font-size: 0.95rem;
        font-weight: 700;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .header-subtitle {
        display: none;
    }

    .header-right {
        flex-shrink: 0;
        display: flex;
        align-items: center;
        gap: 0.4rem;
    }

    /* Compact icon-only buttons in mobile header to eliminate crushing */
    .header-right .btn span {
        display: none;
    }

    .header-right .btn {
        padding: 0.45rem 0.65rem;
        min-height: 38px;
        min-width: 38px;
        justify-content: center;
    }

    .mobile-nav-toggle {
        display: flex;
    }

    /* Content Area with Bottom Bar clearance */
    .content-body {
        padding: 0.75rem 0.75rem calc(72px + env(safe-area-inset-bottom, 16px));
        max-width: 100%;
        min-width: 0;
        box-sizing: border-box;
    }

    /* Mobile Bottom Navigation Bar (Z-Index: 900) */
    .mobile-bottom-bar {
        display: flex;
        align-items: stretch;
        justify-content: space-around;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: calc(56px + env(safe-area-inset-bottom, 0px));
        padding-bottom: env(safe-area-inset-bottom, 0px);
        background: #FFFFFF;
        border-top: 1px solid var(--border-color);
        z-index: 900;
        box-shadow: 0 -4px 16px rgba(44, 33, 28, 0.05);
    }

    .mobile-tab-item {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: flex-end;
        padding-bottom: 7px;
        gap: 3px;
        height: 100%;
        color: var(--text-muted);
        text-decoration: none;
        font-size: 0.65rem;
        font-weight: 600;
        line-height: 1;
        background: none;
        border: none;
        cursor: pointer;
        position: relative;
        transition: color 0.15s ease, transform 0.1s ease;
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
    }

    .mobile-tab-item svg {
        width: 20px;
        height: 20px;
        stroke-width: 1.9;
        transition: transform 0.15s ease;
        margin-bottom: 1px;
    }

    .mobile-tab-item.active {
        color: var(--sake-dark);
    }

    .mobile-tab-item.active svg {
        transform: translateY(-1px);
        stroke-width: 2.2;
    }

    .mobile-tab-item:active {
        transform: scale(0.94);
    }

    /* Floating Center Action Button with Perfectly Aligned Label Baseline */
    .mobile-fab-item {
        position: relative;
        overflow: visible;
    }

    .mobile-fab-circle {
        position: absolute;
        top: -14px;
        left: 50%;
        transform: translateX(-50%);
        width: 44px;
        height: 44px;
        background: linear-gradient(135deg, var(--sake-dark), var(--sake-medium));
        color: var(--sake-pure-cream);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 4px 14px rgba(44, 33, 28, 0.35);
        border: 2px solid #FFFFFF;
        transition: transform 0.15s ease, box-shadow 0.15s ease;
    }

    .mobile-fab-item:active .mobile-fab-circle {
        transform: translateX(-50%) scale(0.92);
        box-shadow: 0 2px 8px rgba(44, 33, 28, 0.25);
    }

    .mobile-fab-circle svg {
        width: 22px;
        height: 22px;
        stroke: #FFFFFF;
    }

    .mobile-fab-item span {
        font-size: 0.65rem;
        font-weight: 700;
        color: var(--sake-dark);
        line-height: 1;
    }

    /* Touch Sizing & Forms */
    .form-control, .form-select {
        font-size: 16px !important; /* Prevents iOS auto-zoom on focus */
        min-height: 44px;
    }

    .btn {
        min-height: 42px;
        touch-action: manipulation;
    }

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

    .form-col-span-2 {
        grid-column: span 1;
    }

    /* Clean Mobile Filter Bar (Decluttered) */
    .filter-bar {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
        padding: 0.75rem;
        align-items: center;
    }

    .filter-bar .filter-group:first-child {
        flex: 1 1 180px;
        min-width: 0;
    }

    .filter-bar .search-input {
        min-width: 0;
        width: 100%;
    }

    .mobile-filter-toggle {
        display: inline-flex;
        align-items: center;
        gap: 0.4rem;
        font-size: 0.8rem;
        font-weight: 600;
        padding: 0.45rem 0.85rem;
        min-height: 44px;
        white-space: nowrap;
        background: var(--bg-surface);
        border-radius: var(--radius-md);
    }

    .mobile-filter-toggle.active {
        background: var(--sake-warm-cream);
        color: var(--sake-dark);
        border-color: var(--sake-medium);
    }

    .mobile-filter-drawer {
        display: none;
        width: 100%;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        gap: 0.55rem;
        margin-top: 0.5rem;
        padding-top: 0.75rem;
        border-top: 1px dashed var(--border-subtle);
        box-sizing: border-box;
    }

    .mobile-filter-drawer.open {
        display: grid;
    }

    .mobile-filter-drawer .filter-group {
        width: 100%;
        min-width: 0;
    }

    .mobile-filter-drawer .filter-group select,
    .mobile-filter-drawer .form-select {
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        font-size: 0.8rem;
        padding: 0.45rem 1.8rem 0.45rem 0.6rem;
        box-sizing: border-box;
        text-overflow: ellipsis;
    }

    /* Görsel 1: 5. filtre grubu tek başına kalmasın, tam genişlikte satırı kaplasın */
    .mobile-filter-drawer .filter-group:nth-child(5) {
        grid-column: 1 / -1 !important;
    }

    .mobile-filter-actions {
        grid-column: 1 / -1 !important;
        display: flex;
        gap: 0.5rem;
        margin-top: 0.35rem;
        width: 100%;
    }

    .mobile-filter-actions .btn {
        flex: 1;
        min-height: 42px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-weight: 600;
        font-size: 0.85rem;
        border-radius: var(--radius-md);
    }

    /* Dashboard Mobile Aesthetics */
    .dash-hero {
        padding: 0.95rem 1rem;
        margin-bottom: 0.75rem;
    }

    .dash-hero-title {
        font-size: 1.15rem;
    }

    .dash-hero-desc {
        font-size: 0.82rem;
    }

    .dash-hero-actions {
        display: none !important;
    }

    /* Modern Horizontal Scroll Status Strip on Mobile (Görsel 2) */
    .status-strip {
        display: flex !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding-bottom: 0.45rem;
        padding-right: 1.5rem;
        margin-bottom: 1rem;
        border: none !important;
        background: transparent !important;
        gap: 0.5rem;
    }

    .status-strip::-webkit-scrollbar {
        display: none;
    }

    .status-strip-item {
        flex: 0 0 auto;
        min-width: 112px;
        padding: 0.65rem 0.75rem;
        background: #FFFFFF;
        border: 1px solid var(--border-color);
        border-radius: var(--radius-md);
        box-shadow: var(--shadow-xs);
    }

    .strip-label {
        font-size: 0.72rem;
        white-space: nowrap !important;
        overflow: visible !important;
        text-overflow: clip !important;
    }

    .strip-label span {
        white-space: nowrap !important;
    }

    .strip-count {
        font-size: 1.3rem;
        margin-top: 0.2rem;
    }

    /* Mobile dashboard tabs scroll horizontally with ease */
    .dash-tabs {
        display: flex !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding-bottom: 0.35rem;
        margin-bottom: 1rem;
        gap: 0.45rem;
    }

    .dash-tabs::-webkit-scrollbar {
        display: none;
    }

    .dash-tab-btn {
        flex: 0 0 auto;
        white-space: nowrap;
        font-size: 0.8rem;
        padding: 0.4rem 0.85rem;
    }

    .strip-count {
        font-size: 1.25rem;
    }

    /* Task Detail Grid Mobile Reorder & Safe Widths */
    .task-detail-grid {
        display: flex !important;
        flex-direction: column !important;
        gap: 1rem !important;
        width: 100% !important;
        min-width: 0 !important;
    }

    .task-detail-grid > div {
        width: 100% !important;
        min-width: 0 !important;
    }

    .panel {
        width: 100% !important;
        min-width: 0 !important;
    }

    .panel-header {
        padding: 0.85rem 1rem;
    }

    .panel-body {
        padding: 0.9rem 1rem;
        width: 100%;
        min-width: 0;
        box-sizing: border-box;
    }

    .settings-sys-grid {
        grid-template-columns: 1fr !important;
    }

    /* Mobile Cards on /tasks/list */
    .mobile-task-list {
        display: flex;
        flex-direction: column;
        gap: 0.65rem;
    }

    .table-responsive.hide-on-mobile {
        display: none !important;
    }

    /* Quick Modal Mobile Bottom Sheet Mode */
    .quick-modal-backdrop {
        padding: 0;
        align-items: flex-end;
    }

    .quick-modal-dialog {
        border-radius: 20px 20px 0 0;
        max-height: 88vh;
        max-width: 100%;
        transform: translateY(100%);
    }

    .quick-modal-handle {
        display: block;
    }

    .quick-pills-row {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }

    .quick-pill-btn {
        min-height: 42px;
        font-size: 0.82rem;
    }
}

/* ==========================================================================
   BLOCKER / SUPPORT REQUEST (ENGEL & DESTEK) STYLES
   ========================================================================== */
.act-badge-blocker {
    background: #fff5f5;
    color: #c92a2a;
    border: 1px solid #ffc9c9;
    font-weight: 700;
}

.blocker-banner {
    background: linear-gradient(135deg, #fff5f5 0%, #ffe3e3 100%);
    border: 1px solid #ffa8a8;
    border-radius: var(--radius-md);
    padding: 1.15rem 1.35rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 14px rgba(201, 42, 42, 0.08);
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.blocker-banner-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.blocker-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.76rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #c92a2a;
    background: #FFFFFF;
    padding: 0.3rem 0.65rem;
    border-radius: var(--radius-pill);
    border: 1px solid #ffa8a8;
    box-shadow: 0 1px 3px rgba(201, 42, 42, 0.1);
}

.blocker-meta {
    font-size: 0.82rem;
    color: #862e2e;
    font-weight: 600;
}

.blocker-body {
    font-size: 0.9rem;
    color: #491217;
    line-height: 1.55;
    background: rgba(255, 255, 255, 0.85);
    padding: 0.85rem 1.1rem;
    border-radius: var(--radius-sm);
    border-left: 3px solid #e03131;
    white-space: pre-wrap;
    word-break: break-word;
}

.badge-blocker {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    background: #ffe3e3;
    color: #c92a2a;
    border: 1px solid #ffa8a8;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 0.15rem 0.45rem;
    border-radius: var(--radius-pill);
}

.note-mode-toggle {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.85rem;
    border-bottom: 1px solid var(--border-subtle);
    padding-bottom: 0.6rem;
}

.note-mode-btn {
    padding: 0.4rem 0.85rem;
    font-size: 0.82rem;
    font-weight: 600;
    border-radius: var(--radius-pill);
    border: 1px solid var(--border-subtle);
    background: var(--bg-surface);
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.15s ease;
}

.note-mode-btn.active {
    background: var(--sake-dark);
    color: #FFFFFF;
    border-color: var(--sake-dark);
}

.note-mode-btn.mode-blocker.active {
    background: #c92a2a;
    color: #FFFFFF;
    border-color: #c92a2a;
}

/* ==========================================================================
   ATTACHMENT (PHOTO, VIDEO, FILE) STYLES
   ========================================================================== */
.attachment-input-row {
    margin-bottom: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex-wrap: wrap;
}

.attachment-btn-label {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.4rem 0.85rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--sake-dark);
    background: var(--bg-surface);
    border: 1px dashed var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.15s ease;
}

.attachment-btn-label:hover {
    background: var(--sake-warm-cream);
    border-color: var(--sake-medium);
}

.attachment-btn-label input[type="file"] {
    display: none;
}

.attachment-file-info {
    font-size: 0.78rem;
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: #FFFFFF;
    padding: 0.25rem 0.6rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-subtle);
}

.attachment-file-info.has-file {
    color: var(--sake-dark);
    font-weight: 600;
    border-color: var(--sake-medium);
    background: var(--sake-warm-cream);
}

.attachment-preview-link {
    display: inline-block;
    margin-top: 0.65rem;
    max-width: 480px;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.attachment-preview-link:hover {
    transform: scale(1.01);
    box-shadow: var(--shadow-sm);
}

.attachment-img {
    display: block;
    max-width: 100%;
    max-height: 480px;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: var(--radius-md);
    background: #1e1b18;
}

.attachment-video-wrap {
    margin-top: 0.65rem;
    max-width: 640px;
    width: 100%;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border-color);
    background: #000000;
}

.attachment-video {
    width: 100%;
    max-height: 420px;
    display: block;
}

.attachment-file-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    margin-top: 0.5rem;
    padding: 0.45rem 0.85rem;
    background: #FFFFFF;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--sake-dark);
    text-decoration: none;
    box-shadow: var(--shadow-xs);
    transition: all 0.15s ease;
}

.attachment-file-chip:hover {
    background: var(--sake-warm-cream);
    border-color: var(--sake-medium);
    transform: translateY(-1px);
}

.attachment-file-chip .attachment-size {
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 500;
}

/* Sound & Notification Controls */
.sound-toggle-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.35rem 0.65rem;
    border-radius: var(--radius-pill);
    border: 1px solid var(--border-color);
    background: #FFFFFF;
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    height: 32px;
}

.sound-toggle-btn:hover {
    background: var(--sake-warm-cream);
    color: var(--sake-dark);
}

.sound-toggle-btn.sound-on {
    color: var(--sake-dark);
    border-color: var(--sake-medium);
    background: var(--sake-warm-cream);
}


