/* ========================================
   DayNight Admin - Flat/Minimal Dashboard
   Snow Edition (Light) / Carbon Edition (Dark)
   ======================================== */

/*

TemplateMo 608 DayNight Admin

https://templatemo.com/tm-608-daynight-admin

*/

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ===== CSS Variables - Snow Edition (Default) ===== */
:root {
    --bg-primary: #FFFFFF;
    --bg-secondary: #F8FAFC;
    --bg-surface: #F1F5F9;
    --border-color: #E2E8F0;
    --text-primary: #1E293B;
    --text-secondary: #64748B;
    --accent: #38BDF8;
    --accent-hover: #0EA5E9;
    --accent-light: rgba(56, 189, 248, 0.1);
    --success: #22C55E;
    --warning: #F59E0B;
    --danger: #EF4444;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.05);
    --transition: all 0.2s ease;
}

/* ===== Carbon Edition (Dark Mode) ===== */
/* Applied to html for instant load, and body for JS toggle */
html.carbon,
body.carbon {
    --bg-primary: #0F0F0F;
    --bg-secondary: #171717;
    --bg-surface: #1F1F1F;
    --border-color: #2E2E2E;
    --text-primary: #F5F5F5;
    --text-secondary: #A3A3A3;
    --accent: #38BDF8;
    --accent-hover: #7DD3FC;
    --accent-light: rgba(56, 189, 248, 0.15);
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
}

/* Ensure html inherits theme background for instant paint */
html {
    background: var(--bg-secondary);
}

/* ===== Base Styles ===== */
html {
    scroll-behavior: smooth;
}

body {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-secondary);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
    transition: var(--transition);
}

a {
    text-decoration: none;
    color: inherit;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

input,
select,
textarea {
    font-family: inherit;
    font-size: 0.9375rem;
}

/* ===== Layout ===== */
.app-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.main-content {
    flex: 1;
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

/* ===== Top Navigation ===== */
.top-nav {
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: var(--transition);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 3rem;
}

.logo {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo-icon {
    width: 32px;
    height: 32px;
    background: var(--accent);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-icon svg {
    width: 18px;
    height: 18px;
    fill: white;
}

/* ===== Navigation Menu ===== */
.nav-menu {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.nav-item {
    position: relative;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 0.875rem;
    color: var(--text-secondary);
    font-size: 0.9375rem;
    font-weight: 500;
    border-radius: 6px;
    transition: var(--transition);
}

.nav-link:hover {
    color: var(--text-primary);
    background: var(--bg-surface);
}

.nav-link.active {
    color: var(--accent);
    background: var(--accent-light);
}

.nav-link svg {
    width: 18px;
    height: 18px;
    opacity: 0.7;
}

.dropdown-arrow {
    width: 12px !important;
    height: 12px !important;
    transition: transform 0.2s ease;
}

/* ===== Dropdown Menu ===== */
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 0.5rem;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: var(--shadow-md);
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.2s ease;
    z-index: 200;
}

/* 
.nav-item:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-item:hover .dropdown-arrow {
    transform: rotate(180deg);
} */

.dropdown-menu a {
    display: block;
    padding: 0.625rem 1rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
    transition: var(--transition);
}

.dropdown-menu a:hover {
    color: var(--text-primary);
    background: var(--bg-surface);
}

.dropdown-menu a:first-child {
    border-radius: 8px 8px 0 0;
}

.dropdown-menu a:last-child {
    border-radius: 0 0 8px 8px;
}

/* ===== Nav Right ===== */
.nav-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* ===== Theme Toggle ===== */
.theme-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem;
    background: var(--bg-surface);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.theme-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    color: var(--text-secondary);
    transition: var(--transition);
}

.theme-btn:hover {
    color: var(--text-primary);
}

.theme-btn.active {
    background: var(--bg-primary);
    color: var(--accent);
    box-shadow: var(--shadow);
}

.theme-btn svg {
    width: 18px;
    height: 18px;
}

/* ===== User Menu ===== */
.user-menu {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.375rem 0.75rem 0.375rem 0.375rem;
    background: var(--bg-surface);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: var(--transition);
}

.user-menu:hover {
    border-color: var(--accent);
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    background: linear-gradient(135deg, var(--accent), var(--accent-hover));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 0.875rem;
}

.user-name {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
}

/* Logout Button */
.btn-logout {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    color: var(--text-secondary);
    transition: var(--transition);
}

.btn-logout:hover {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

.btn-logout svg {
    width: 18px;
    height: 18px;
}

/* ===== Page Header ===== */
.page-header {
    margin-bottom: 2rem;
}

.greeting {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.greeting-sub {
    color: var(--text-secondary);
    font-size: 0.9375rem;
}

/* ===== Cards ===== */
.card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    transition: var(--transition);
    overflow: hidden;
}

.card:hover {
    box-shadow: var(--shadow-md);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
}

.card-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.card-subtitle {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    margin-top: 0.125rem;
}

/* ===== Stats Grid ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.25rem;
    transition: var(--transition);
}

.stat-card:hover {
    border-color: var(--accent);
}

.stat-label {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.stat-change {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.8125rem;
    font-weight: 500;
}

.stat-change.positive {
    color: var(--success);
}

.stat-change.negative {
    color: var(--danger);
}

.stat-change svg {
    width: 14px;
    height: 14px;
}

/* ===== Date Range Picker ===== */
.date-picker {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.25rem;
}

.date-btn {
    padding: 0.5rem 0.875rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-secondary);
    border-radius: 6px;
    transition: var(--transition);
}

.date-btn:hover {
    color: var(--text-primary);
}

.date-btn.active {
    background: var(--bg-primary);
    color: var(--accent);
    box-shadow: var(--shadow);
}

/* ===== Pure CSS Charts ===== */
.chart-container {
    padding: 1rem 0;
}

/* Chart Scroll Container - Per Card Section */
.chart-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0.5rem;
}

.chart-scroll::-webkit-scrollbar {
    height: 8px;
}

.chart-scroll::-webkit-scrollbar-track {
    background: var(--bg-surface);
    border-radius: 4px;
}

.chart-scroll::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

.chart-scroll::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

.chart-scroll-inner {
    min-width: 600px;
}

/* Card content scroll wrapper */
.card-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0.5rem;
}

.card-scroll::-webkit-scrollbar {
    height: 8px;
}

.card-scroll::-webkit-scrollbar-track {
    background: var(--bg-surface);
    border-radius: 4px;
}

.card-scroll::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

.card-scroll-inner {
    min-width: 500px;
}

/* Bar Chart */
.bar-chart {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    height: 200px;
    padding: 1rem 0 1rem 3rem;
    border-bottom: 1px solid var(--border-color);
    position: relative;
}

/* Y-Axis */
.y-axis {
    position: absolute;
    left: 0;
    top: 1rem;
    bottom: 1rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 2.5rem;
}

.y-axis-label {
    font-size: 0.6875rem;
    color: var(--text-secondary);
    text-align: right;
    padding-right: 0.5rem;
}

.y-axis-lines {
    position: absolute;
    left: 3rem;
    right: 0;
    top: 1rem;
    bottom: 1rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    pointer-events: none;
}

.y-axis-line {
    border-top: 1px dashed var(--border-color);
    width: 100%;
}

.bar-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
}

.bar-wrapper {
    display: flex;
    align-items: flex-end;
    gap: 4px;
    height: 160px;
}

.bar {
    width: 24px;
    border-radius: 4px 4px 0 0;
    transition: all 0.3s ease;
}

.bar.current {
    background: var(--accent);
}

.bar.previous {
    background: var(--border-color);
}

.bar:hover {
    opacity: 0.8;
    transform: scaleY(1.02);
    transform-origin: bottom;
}

.bar-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* Line Chart */
.line-chart {
    position: relative;
    height: 200px;
    margin: 1rem 0;
}

.line-chart-svg {
    width: 100%;
    height: 100%;
}

.line-chart-path {
    fill: none;
    stroke: var(--accent);
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.line-chart-area {
    fill: url(#gradient);
    opacity: 0.3;
}

.line-chart-dot {
    fill: var(--accent);
    stroke: var(--bg-primary);
    stroke-width: 2;
}

/* Progress Bar */
.progress-bar {
    height: 8px;
    background: var(--bg-surface);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.5s ease;
}

.progress-fill.accent {
    background: var(--accent);
}

.progress-fill.success {
    background: var(--success);
}

.progress-fill.warning {
    background: var(--warning);
}

.progress-fill.danger {
    background: var(--danger);
}

/* Donut Chart */
.donut-chart {
    width: 120px;
    height: 120px;
    position: relative;
}

.donut-chart svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.donut-ring {
    fill: none;
    stroke: var(--bg-surface);
    stroke-width: 12;
}

.donut-segment {
    fill: none;
    stroke-width: 12;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.5s ease;
}

.donut-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.donut-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.donut-label {
    font-size: 0.6875rem;
    color: var(--text-secondary);
}

/* Chart Legend */
.chart-legend {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-top: 1rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

.legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.legend-dot.current {
    background: var(--accent);
}

.legend-dot.previous {
    background: var(--border-color);
}

/* ===== Activity Feed ===== */
.activity-feed {
    display: flex;
    flex-direction: column;
}

.activity-item {
    display: flex;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.activity-icon.blue {
    background: var(--accent-light);
    color: var(--accent);
}

.activity-icon.green {
    background: rgba(34, 197, 94, 0.1);
    color: var(--success);
}

.activity-icon.orange {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
}

.activity-icon svg {
    width: 18px;
    height: 18px;
}

.activity-content {
    flex: 1;
}

.activity-text {
    font-size: 0.875rem;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.activity-text strong {
    font-weight: 600;
}

.activity-time {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* ===== Two Column Layout ===== */
.two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 8px;
    transition: var(--transition);
}

.btn svg {
    width: 16px;
    height: 16px;
}

.btn-primary {
    background: var(--accent);
    color: white;
}

.btn-primary:hover {
    background: var(--accent-hover);
}

.btn-secondary {
    background: var(--bg-surface);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.btn-ghost {
    color: var(--text-secondary);
}

.btn-ghost:hover {
    color: var(--accent);
    background: var(--accent-light);
}

/* ===== Form Elements ===== */
.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    transition: var(--transition);
}

.form-input:hover {
    border-color: var(--text-secondary);
}

.form-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-light);
}

.form-input::placeholder {
    color: var(--text-secondary);
}

/* ===== Tables ===== */
.table-container {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

th {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    background: var(--bg-surface);
}

td {
    font-size: 0.875rem;
    color: var(--text-primary);
}

tr:hover td {
    background: var(--bg-surface);
}

/* ===== Badges ===== */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.625rem;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 6px;
}

.badge-blue {
    background: var(--accent-light);
    color: var(--accent);
}

.badge-green {
    background: rgba(34, 197, 94, 0.1);
    color: var(--success);
}

.badge-orange {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
}

.badge-red {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

/* ===== Avatar Group ===== */
.avatar-group {
    display: flex;
}

.avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid var(--bg-primary);
    margin-left: -8px;
    background: var(--bg-surface);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.avatar:first-child {
    margin-left: 0;
}

.avatar.blue {
    background: var(--accent);
    color: white;
}

.avatar.green {
    background: var(--success);
    color: white;
}

.avatar.orange {
    background: var(--warning);
    color: white;
}

.avatar.purple {
    background: #A855F7;
    color: white;
}

/* ===== Footer ===== */
.footer {
    background: var(--bg-primary);
    border-top: 1px solid var(--border-color);
    padding: 1.25rem 2rem;
    text-align: center;
    margin-top: auto;
}

.footer p {
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

.footer a {
    color: var(--accent);
    transition: var(--transition);
}

.footer a:hover {
    color: var(--accent-hover);
}

/* ===== Kanban Board ===== */
.kanban-board {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.kanban-column {
    background: var(--bg-surface);
    border-radius: 12px;
    padding: 1rem;
    min-height: 400px;
}

.kanban-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-color);
}

.kanban-title {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-primary);
}

.kanban-count {
    font-size: 0.75rem;
    color: var(--text-secondary);
    background: var(--bg-primary);
    padding: 0.125rem 0.5rem;
    border-radius: 4px;
}

.kanban-cards {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.kanban-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    cursor: pointer;
    transition: var(--transition);
}

.kanban-card:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow-md);
}

.kanban-card-title {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.kanban-card-desc {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.kanban-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.kanban-card-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* ===== Inbox Split Pane ===== */
.inbox-container {
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 0;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    height: calc(100vh - 200px);
    min-height: 500px;
}

.inbox-list {
    border-right: 1px solid var(--border-color);
    overflow-y: auto;
}

.inbox-header {
    padding: 1.25rem;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    background: var(--bg-primary);
    z-index: 10;
}

.inbox-search {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 1rem;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

.inbox-search svg {
    width: 18px;
    height: 18px;
    color: var(--text-secondary);
}

.inbox-search input {
    flex: 1;
    border: none;
    background: none;
    color: var(--text-primary);
    outline: none;
}

.inbox-search input::placeholder {
    color: var(--text-secondary);
}

.message-list {
    display: flex;
    flex-direction: column;
}

.message-item {
    display: flex;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: var(--transition);
}

.message-item:hover {
    background: var(--bg-surface);
}

.message-item.active {
    background: var(--accent-light);
    border-left: 3px solid var(--accent);
}

.message-item.unread .message-sender {
    font-weight: 600;
}

.message-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 0.875rem;
    flex-shrink: 0;
}

.message-content {
    flex: 1;
    min-width: 0;
}

.message-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.25rem;
}

.message-sender {
    font-size: 0.875rem;
    color: var(--text-primary);
}

.message-time {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.message-subject {
    font-size: 0.8125rem;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.message-preview {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Message View */
.message-view {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: auto;
}

.message-view-header {
    padding: 1.25rem;
    border-bottom: 1px solid var(--border-color);
}

.message-view-subject {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.message-view-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.message-view-sender {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.message-view-sender-name {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
}

.message-view-sender-email {
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

.message-view-date {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    margin-left: auto;
}

.message-view-body {
    flex: 1;
    padding: 1.5rem;
    overflow-y: auto;
}

.message-view-body p {
    margin-bottom: 1rem;
    line-height: 1.7;
    color: var(--text-primary);
}

.message-view-reply {
    padding: 1.25rem;
    border-top: 1px solid var(--border-color);
}

.reply-input {
    width: 100%;
    padding: 1rem;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    resize: none;
    min-height: 100px;
}

.reply-input:focus {
    outline: none;
    border-color: var(--accent);
}

.reply-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: 0.75rem;
}

/* ===== Settings Page ===== */
.settings-nav {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.settings-nav-link {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    border-radius: 6px;
    transition: var(--transition);
}

.settings-nav-link:hover {
    color: var(--text-primary);
    background: var(--bg-surface);
}

.settings-nav-link.active {
    color: var(--accent);
    background: var(--accent-light);
}

.settings-section {
    margin-bottom: 2.5rem;
}

.settings-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.settings-desc {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.settings-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
}

.settings-row:last-child {
    border-bottom: none;
}

.settings-row-info {
    flex: 1;
}

.settings-row-label {
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.settings-row-desc {
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

/* Toggle Switch */
.toggle {
    position: relative;
    width: 44px;
    height: 24px;
}

.toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    transition: var(--transition);
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 2px;
    bottom: 2px;
    background: var(--text-secondary);
    border-radius: 50%;
    transition: var(--transition);
}

.toggle input:checked+.toggle-slider {
    background: var(--accent);
    border-color: var(--accent);
}

.toggle input:checked+.toggle-slider:before {
    background: white;
    transform: translateX(20px);
}

/* ===== Login Page ===== */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: var(--bg-secondary);
}

.login-container {
    width: 100%;
    max-width: 400px;
}

.login-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2.5rem;
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.login-logo .logo-icon {
    width: 48px;
    height: 48px;
}

.login-logo .logo-icon svg {
    width: 26px;
    height: 26px;
}

.login-logo span {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.login-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.login-subtitle {
    font-size: 0.9375rem;
    color: var(--text-secondary);
}

.login-form {
    margin-bottom: 1.5rem;
}

.login-form .btn-primary {
    width: 100%;
    padding: 0.875rem;
}

.login-divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1.5rem 0;
}

.login-divider span {
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

.login-divider::before,
.login-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--border-color);
}

.login-footer {
    text-align: center;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.login-footer a {
    color: var(--accent);
    font-weight: 500;
}

.login-footer a:hover {
    color: var(--accent-hover);
}

.login-theme-toggle {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
}

/* ===== Responsive ===== */
@media (max-width: 1200px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .two-col {
        grid-template-columns: 1fr;
    }

    .kanban-board {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 992px) {
    .nav-container {
        padding: 0 1rem;
    }

    .nav-menu {
        display: none;
    }

    .main-content {
        padding: 1.5rem;
    }

    .inbox-container {
        grid-template-columns: 1fr;
        height: auto;
    }

    .inbox-list {
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        max-height: 300px;
    }
}

@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .kanban-board {
        grid-template-columns: 1fr;
    }

    .bar-chart {
        overflow-x: auto;
    }

    .date-picker {
        flex-wrap: wrap;
    }

    .user-name {
        display: none;
    }
}

/* ===== Settings 2-Column Layout ===== */
.settings-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

@media (max-width: 992px) {
    .settings-grid {
        grid-template-columns: 1fr;
    }
}

/* ===== Mobile Menu ===== */
.mobile-menu-btn {
    display: none;
    padding: 0.5rem;
    color: var(--text-primary);
}

.mobile-menu-btn svg {
    width: 24px;
    height: 24px;
}

/* Mobile Menu Overlay */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Mobile Menu Panel */
.mobile-menu {
    position: fixed;
    top: 0;
    right: -280px;
    width: 280px;
    height: 100vh;
    background: var(--bg-primary);
    border-left: 1px solid var(--border-color);
    z-index: 1000;
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
}

.mobile-menu.active {
    right: 0;
}

.mobile-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
}

.mobile-menu-header .logo {
    font-size: 1.125rem;
}

.mobile-menu-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    color: var(--text-secondary);
    transition: var(--transition);
}

.mobile-menu-close:hover {
    background: var(--bg-surface);
    color: var(--text-primary);
}

.mobile-menu-close svg {
    width: 20px;
    height: 20px;
}

.mobile-menu-nav {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
}

.mobile-menu-nav a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    color: var(--text-secondary);
    font-size: 0.9375rem;
    font-weight: 500;
    border-radius: 8px;
    margin-bottom: 0.25rem;
    transition: var(--transition);
}

.mobile-menu-nav a:hover {
    background: var(--bg-surface);
    color: var(--text-primary);
}

.mobile-menu-nav a.active {
    background: var(--accent-light);
    color: var(--accent);
}

.mobile-menu-nav a svg {
    width: 20px;
    height: 20px;
    opacity: 0.7;
}

.mobile-menu-footer {
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--border-color);
}

.mobile-logout-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--danger);
    background: rgba(239, 68, 68, 0.1);
    border-radius: 8px;
    transition: var(--transition);
}

.mobile-logout-btn:hover {
    background: rgba(239, 68, 68, 0.2);
}

.mobile-logout-btn svg {
    width: 20px;
    height: 20px;
}

.mobile-menu-footer .theme-toggle {
    width: 100%;
    justify-content: center;
}

@media (max-width: 992px) {
    .mobile-menu-btn {
        display: flex;
    }
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.modal-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    width: 100%;
    max-width: 520px;
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
}

.modal-header h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.modal-header button {
    color: var(--text-secondary);
    font-size: 1.25rem;
    padding: 0.25rem;
}

.modal-header button:hover {
    color: var(--danger);
}

.modal-card .form-group {
    margin-bottom: 1.25rem;
}

.modal-card .form-input,
.modal-card .form-textarea {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.swal2-container {
    z-index: 99999 !important;
}

.fixed-textarea {
    height: 200px;
    width: 450px;
    resize: none;
    overflow-y: auto;
    line-height: 1.5;
}

.pagination-wrapper {
    display: flex;
    justify-content: center;
    margin-top: 24px;
}

.pagination {
    display: flex;
    gap: 6px;
    list-style: none;
    padding: 0;
}

.pagination li a,
.pagination li span {
    padding: 6px 12px;
    border-radius: 6px;
    background: var(--card-bg);
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.9rem;
}

.pagination li.active a {
    background: #3b82f6;
    color: #fff;
}

.pagination li.disabled a,
.pagination li.disabled span {
    opacity: 0.4;
    pointer-events: none;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-right .logout {
    color: #ff6b6b;
}

.nav-right .logout:hover {
    background: rgba(255, 107, 107, 0.15);
}

/* ================= GRID ================= */
.stats-grid {
    display: grid;
    gap: 16px;
}

.info-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    margin-bottom: 2.5rem;
}

.product-grid {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

/* ================= PRODUCT CARD ================= */
.product-card {
    transition: transform .25s ease, box-shadow .25s ease;
}

/* COVER */
.product-cover {
    width: 100%;
    height: 160px;
    border-radius: 14px;
    overflow: hidden;
    background: #111;
    margin-bottom: 12px;
}

.product-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .35s ease;
}

.product-card:hover .product-cover img {
    transform: scale(1.05);
}

/* DISCOUNT BADGE */
.discount-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 5px 10px;
    border-radius: 999px;
}

/* TEXT */
.product-title {
    font-size: 1rem;
    font-weight: 600;
    margin: 6px 0;
}

.product-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* FEATURES */
.feature-list {
    list-style: none;
    padding: 0;
    margin-bottom: 14px;
}

.feature-list li {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    margin-bottom: 4px;
}

.feature-list i {
    color: #22c55e;
}

/* TAGS */
.material-tags {
    display: flex;
    gap: 6px;
    margin: 8px 0;
}

.material-tags .tag {
    font-size: 0.7rem;
    padding: 4px 8px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.tag.video {
    background: rgba(59, 130, 246, .15);
    color: #3b82f6;
}

.tag.doc {
    background: rgba(16, 185, 129, .15);
    color: #10b981;
}

.tag.live {
    background: rgba(239, 68, 68, .15);
    color: #ef4444;
}

/* PRICE */
.price-area {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 10px 0;
}

.price-left {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.product-card .old-price {
    font-size: 0.75rem;
    /* daha küçük */
    opacity: 0.7;
}

.product-card .new-price {
    font-size: 1rem;
    /* 1.15 → 1.0 */
    font-weight: 700;
}

.product-card .price-badge {
    font-size: 0.65rem;
    padding: 3px 7px;
}

/* ACTION */
.product-actions.single {
    margin-top: 10px;
}

.btn-block {
    width: 100%;
    justify-content: center;
    gap: 6px;
}

/* ================= VIEW ALL CARD ================= */
.view-all-card {
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px dashed rgba(59, 130, 246, 0.35);
    background: linear-gradient(135deg,
            rgba(59, 130, 246, 0.08),
            rgba(59, 130, 246, 0.02));
}

.view-all-inner {
    text-align: center;
    padding: 24px;
}

.view-all-inner i {
    font-size: 2rem;
    color: var(--accent);
    margin-bottom: 10px;
}

.view-all-inner h4 {
    margin: 6px 0;
    font-size: 1rem;
    font-weight: 600;
}

.view-all-inner p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

/* =========================================================
   TESTIMONIALS (Kullanıcı Yorumları)
   Theme-safe | Light + Dark uyumlu
   ========================================================= */

/* Wrapper */
.testimonial-section {
    margin-top: 3rem;
}

/* Header */
.testimonial-header {
    margin-bottom: 1.25rem;
}

.testimonial-header h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.testimonial-header p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

/* Horizontal slider */
.testimonial-slider {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 8px;
}

.testimonial-slider::-webkit-scrollbar {
    height: 6px;
}

.testimonial-slider::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

/* Track */
.testimonial-track {
    display: flex;
    gap: 16px;
}

/* Card */
.testimonial-card {
    min-width: 300px;
    max-width: 300px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 16px;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: var(--transition);
}

.testimonial-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--accent);
}

/* Quote icon */
.testimonial-quote {
    font-size: 1.25rem;
    color: var(--accent);
    margin-bottom: 6px;
}

/* Text */
.testimonial-text {
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--text-secondary);
    margin-bottom: 14px;
}

/* Footer */
.testimonial-footer {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Avatar */
.testimonial-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--accent-hover));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 600;
    color: #fff;
    flex-shrink: 0;
}

/* User info */
.testimonial-user {
    display: flex;
    flex-direction: column;
}

.testimonial-user strong {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
}

.testimonial-user span {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* Stars */
.testimonial-stars {
    margin-top: 4px;
    color: #facc15;
    font-size: 0.8rem;
}

/* Responsive */
@media (max-width: 768px) {
    .testimonial-card {
        min-width: 260px;
        max-width: 260px;
    }
}


/* ================= PRODUCT DETAIL ================= */

.product-hero {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 32px;
    margin-bottom: 3rem;
}

.hero-media img {
    width: 100%;
    height: 420px;
    object-fit: cover;
    border-radius: 18px;
}

.hero-video .video-wrapper {
    position: relative;
    padding-top: 56.25%;
    border-radius: 18px;
    overflow: hidden;
    background: #000;
}

.hero-video iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.hero-info h1 {
    font-size: 2.2rem;
    margin-bottom: .75rem;
}

.hero-subtitle {
    opacity: .9;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.hero-price {
    margin-bottom: 1.5rem;
}

.hero-price .old-price {
    text-decoration: line-through;
    opacity: .6;
    margin-right: 10px;
}

.hero-price .new-price {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
}

.hero-cta {
    padding: 14px 28px;
    font-size: 1.05rem;
}

.detail-card {
    padding: 2.5rem;
}

.section-title {
    font-size: 1.4rem;
    margin-bottom: .75rem;
}

.feature-list.large li {
    font-size: 1rem;
    padding: 6px 0;
}

.material-tags.large .tag {
    font-size: .9rem;
    padding: 6px 12px;
}

/* Responsive */
@media (max-width: 992px) {
    .product-hero {
        grid-template-columns: 1fr;
    }

    .hero-media img {
        height: 280px;
    }
}

/* ================= PRODUCT DETAIL FINAL ================= */

.product-top-grid {
    display: grid;
    grid-template-columns: 1.2fr .8fr;
    gap: 24px;
    margin-bottom: 2.5rem;
}

/* IMAGE */
.product-image-card img {
    width: 100%;
    height: 420px;
    object-fit: cover;
    border-radius: 16px;
}

/* BUY CARD */
.product-buy-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.product-buy-card .product-title {
    font-size: 2rem;
    margin-bottom: .5rem;
}

.product-short-desc {
    opacity: .9;
    margin-bottom: 1rem;
    line-height: 1.6;
}

/* MINI FEATURES */
.mini-feature-list {
    list-style: none;
    padding: 0;
    margin: 0 0 1.25rem;
}

.mini-feature-list li {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: .95rem;
    margin-bottom: 6px;
}

.mini-feature-list i {
    color: var(--primary);
}

/* PRICE */
.price-box {
    margin: 1.2rem 0 1.5rem;
}

.old-price {
    text-decoration: line-through;
    opacity: .6;
    margin-right: 8px;
}

.new-price {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
}

/* VIDEO */
.product-video-card {
    margin-bottom: 3rem;
}

.product-video-card .video-wrapper {
    border-radius: 16px;
    overflow: hidden;
    background: #000;
}

.product-video-card video {
    width: 100%;
    height: auto;
    display: block;
}

/* MOBILE */
@media (max-width: 992px) {
    .product-top-grid {
        grid-template-columns: 1fr;
    }

    .product-image-card img {
        height: 260px;
    }
}

/* ================= DISCOUNT BADGE ================= */

.product-buy-card {
    position: relative;
}

.discount-badge.large {
    position: absolute;
    top: 16px;
    right: 16px;
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: #fff;
    font-weight: 700;
    font-size: .85rem;
    padding: 6px 12px;
    border-radius: 999px;
    box-shadow: 0 6px 16px rgba(34, 197, 94, .35);
    letter-spacing: .3px;
}

/* ================= STUDENT DROPDOWN ================= */
/* ================= STUDENT DROPDOWN (FINAL) ================= */

.nav-dropdown {
    position: relative;
}

.dropdown-toggle {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    min-width: 220px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    padding: 8px;
    display: none;
    z-index: 9999;
}

.dropdown-menu.show {
    display: block;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: .9rem;
    color: var(--text-primary);
}

.dropdown-item:hover {
    background: var(--bg-surface);
}

.dropdown-item.active {
    background: var(--accent-light);
    color: var(--accent);
    font-weight: 600;
}

.top-nav,
.nav-container,
.nav-right {
    overflow: visible !important;
}

/* ===== STUDENT DROPDOWN FORCE FIX ===== */
#studentDropdown {
    display: none;
}

#studentDropdown.show {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
}

.cart-link {
    position: relative;
}

.cart-badge {
    position: absolute;
    top: -6px;
    right: -10px;
    background: #ef4444;
    color: #fff;
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 999px;
    font-weight: 600;
}

.rating-stars {
    color: #facc15;
    font-size: 14px;
    margin: 6px 0 10px;
}

.rating-stars i {
    margin-right: 2px;
}

/* ===== PRODUCT ACTION – PERFECT EQUAL WIDTH FIX ===== */

.product-actions.dual {
    display: flex;
    gap: 10px;
}

/* a ve form %50 */
.product-actions.dual>a,
.product-actions.dual>form {
    flex: 1 1 0;
}

/* içteki butonlar %100 ve aynı box */
.product-actions.dual>a.btn,
.product-actions.dual>form>.btn {
    width: 100%;
    min-height: 42px;

    padding: 0 14px;
    /* kritik */

    display: flex;
    align-items: center;
    justify-content: center;

    white-space: nowrap;
    box-sizing: border-box;
}

/* ===== ACCENT BUTTON VARIANTS ===== */

/* DOLU (Satın Al) */
.btn-accent-fill {
    background: var(--accent);
    color: #fff;
    border: 1px solid var(--accent);
}

.btn-accent-fill:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
}

/* ÇERÇEVELİ (İncele) */
.btn-outline-accent {
    background: #fff;
    color: var(--accent);
    border: 1px solid var(--accent);
}

html.carbon .btn-outline-accent,
body.carbon .btn-outline-accent {
    background: transparent;
    color: var(--accent);
}

.btn-outline-accent:hover {
    background: var(--accent);
    color: #fff;
}

/* ===== PRICE COLORS (FORCE) ===== */
.old-price {
    color: #ef4444 !important;
    /* kırmızı */
    font-weight: 500;
}

.new-price {
    color: #22c55e !important;
    /* yeşil */
    font-weight: 700;
}

.product-divider {
    height: 1px;
    background: linear-gradient(to right,
            transparent,
            var(--border-color),
            transparent);
    margin: 14px 0;
}


.product-card .price-area {
    padding: 8px 10px;
    background: var(--bg-surface);
    border-radius: 10px;
    margin: 10px 0;
}

.price-badge {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 999px;
}

/* ================= CHECKOUT STEP INDICATOR ================= */

.checkout-steps {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 520px;
    margin: 0 auto 2.5rem;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    position: relative;
    z-index: 1;
}

.step-circle {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--bg-surface);
    border: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 16px;
    transition: all 0.3s ease;
}

.step-label {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: color 0.3s ease;
}

/* LINE */
.step-line {
    flex: 1;
    height: 2px;
    background: var(--border-color);
    margin: 0 8px;
    position: relative;
    top: -10px;
    transition: background 0.3s ease;
}

/* ACTIVE STEP */
.step.active .step-circle {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
    box-shadow: 0 6px 18px rgba(56, 189, 248, 0.35);
}

.step.active .step-label {
    color: var(--accent);
    font-weight: 600;
}

/* COMPLETED STEP (ileride kullanılacak) */
.step.completed .step-circle {
    background: var(--success);
    border-color: var(--success);
    color: #fff;
}

.step.completed .step-label {
    color: var(--success);
}

.step-line.completed {
    background: var(--success);
}

/* MOBILE */
@media (max-width: 480px) {
    .checkout-steps {
        max-width: 100%;
        padding: 0 12px;
    }

    .step-label {
        font-size: 0.7rem;
    }
}

/* ================= CHECKOUT GRID ================= */

.checkout-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
    margin-top: 2rem;
}

/* LEFT */
.checkout-left {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* CART ITEM */
.cart-item {
    display: grid;
    grid-template-columns: 90px 1fr auto;
    gap: 16px;
    padding: 14px 0;
    border-bottom: 1px solid var(--border-color);
}

.cart-item:last-child {
    border-bottom: none;
}

.cart-item-cover {
    width: 90px;
    height: 70px;
    border-radius: 10px;
    overflow: hidden;
    background: #000;
}

.cart-item-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cart-item-title {
    font-size: .95rem;
    font-weight: 600;
}

.cart-item-prices {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-top: 4px;
}

.cart-item-discount {
    font-size: .75rem;
    color: #22c55e;
    margin-top: 4px;
}

/* RIGHT */
.checkout-right {
    position: sticky;
    top: 90px;
    height: fit-content;
}

.order-summary {
    padding: 1.75rem;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: .9rem;
}

.summary-row.discount {
    color: #22c55e;
}

.summary-row.total {
    font-size: 1.1rem;
    font-weight: 700;
}

.summary-divider {
    height: 1px;
    background: var(--border-color);
    margin: 12px 0;
}

.summary-note {
    font-size: .75rem;
    color: var(--text-secondary);
    text-align: center;
    margin-top: 10px;
}

/* MOBILE */
@media (max-width: 992px) {
    .checkout-grid {
        grid-template-columns: 1fr;
    }

    .checkout-right {
        position: static;
    }
}

/* ================= RECOMMENDED PRODUCTS ================= */

.recommended-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 14px;
}

.recommended-item {
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    background: var(--bg-primary);
    transition: var(--transition);
}

.recommended-item:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow-md);
}

.recommended-cover {
    width: 100%;
    height: 100px;
    overflow: hidden;
    background: #000;
}

.recommended-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.recommended-info {
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.recommended-title {
    font-size: .8rem;
    font-weight: 600;
    line-height: 1.3;
}

.recommended-price {
    display: flex;
    gap: 6px;
    align-items: center;
}

.recommended-price .old-price {
    font-size: .7rem;
    opacity: .6;
}

.recommended-price .new-price {
    font-size: .85rem;
    font-weight: 700;
}

.form-textarea {
    width: 100%;
    min-height: 120px;
    padding: 12px 14px;

    font-family: inherit;
    font-size: 0.95rem;
    line-height: 1.6;

    color: var(--text-primary);
    background-color: var(--bg-surface);

    border: 1px solid var(--border-color);
    border-radius: 10px;

    resize: vertical;
    outline: none;
    box-sizing: border-box;
}

.form-textarea:focus {
    border-color: var(--accent);
    background-color: var(--bg-primary);
}

.video-layout {
    display: grid;
    grid-template-columns: 3fr 1.2fr;
    gap: 24px;
}

.video-main video {
    width: 100%;
    border-radius: 14px;
    margin-bottom: 16px;
}

.video-sidebar {
    background: var(--bg-secondary);
    border-radius: 14px;
    padding: 16px;
}

.lesson-item {
    display: block;
    padding: 10px;
    border-radius: 8px;
    color: var(--text-primary);
    text-decoration: none;
}

.lesson-item.active {
    background: var(--accent-light);
    font-weight: 600;
}

.product-meta {
    display: flex;
    gap: 16px;
    margin: 12px 0 16px;
    font-size: 14px;
    color: var(--text-secondary);
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.meta-icon {
    color: var(--accent);
    font-size: 15px;
}

.product-cover.overlay {
    position: relative;
}

.badge-overlay {
    position: absolute;
    bottom: 10px;
    left: 10px;
    background: rgba(34, 197, 94, .9);
    color: white;
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 999px;
}

.product-meta.grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    font-size: 13px;
    color: var(--text-secondary);
}

.product-footer-info {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 8px;
}

.product-actions {
    margin-top: 16px;
}

.other-packages-card {
    border: 2px dashed var(--border-color);
    background: var(--bg-secondary);
}

.other-packages-card .product-content.center {
    align-items: center;
    text-align: center;
}

.other-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--accent-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: var(--accent);
    margin-bottom: 12px;
}

.other-desc {
    font-size: 13px;
    color: var(--text-secondary);
    margin: 6px 0 14px;
}

/* =================================================
   LESSON DETAIL / WATCH PAGE
   Existing Card Design Compatible
================================================= */

/* ---------- GRID LAYOUT ---------- */
.lesson-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 24px;
    align-items: flex-start;
}

/* ---------- MAIN VIDEO CARD ---------- */
.lesson-video-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.lesson-video-card video {
    width: 100%;
    max-height: 480px;
    background: #000;
    display: block;
}

/* ---------- VIDEO PLACEHOLDER ---------- */
.video-placeholder {
    height: 360px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* ---------- LESSON HEADER ---------- */
.lesson-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
}

.lesson-header h2 {
    font-size: 1.35rem;
    font-weight: 600;
    margin-bottom: 6px;
}

.lesson-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* ---------- RATING ---------- */
.lesson-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #facc15;
}

.lesson-rating span {
    margin-left: 6px;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* ---------- DESCRIPTION ---------- */
.lesson-desc {
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--text-secondary);
    margin: 0;
    padding: 0;
    text-align: left;
}

/* ---------- FEATURES ---------- */
.lesson-feature-list {
    padding: 0 20px 20px;
    list-style: none;
}

.lesson-feature-list li {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    margin-bottom: 6px;
}

.lesson-feature-list i {
    color: var(--success);
}

/* ---------- DOCUMENTS CARD ---------- */
.lesson-documents-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 18px;
    margin-top: 20px;
    box-shadow: var(--shadow);
}

.lesson-documents-card h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1rem;
    margin-bottom: 14px;
}

/* ---------- DOCUMENT LIST ---------- */
.document-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.document-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
    background: var(--bg-surface);
    border-radius: 10px;
    font-size: 0.85rem;
    color: var(--text-primary);
    transition: var(--transition);
}

.document-row:hover {
    background: var(--accent-light);
    color: var(--accent);
}

.doc-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.doc-left i {
    color: var(--accent);
}

.doc-date {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* ---------- SIDEBAR ---------- */
.lesson-sidebar {
    position: sticky;
    top: 90px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 16px;
    box-shadow: var(--shadow-md);
}

.lesson-sidebar h4 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 12px;
}

/* ---------- SIDEBAR LESSON ITEMS ---------- */
.lesson-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    font-size: 0.85rem;
    color: var(--text-primary);
    transition: var(--transition);
}

.lesson-item i {
    color: var(--accent);
    font-size: 0.95rem;
}

.lesson-item:hover {
    background: var(--bg-surface);
}

.lesson-item.active {
    background: var(--accent-light);
    color: var(--accent);
    font-weight: 600;
}

/* ---------- MOBILE ---------- */
@media (max-width: 992px) {
    .lesson-layout {
        grid-template-columns: 1fr;
    }

    .lesson-sidebar {
        position: static;
        margin-top: 20px;
    }

    .lesson-video-card video {
        max-height: 280px;
    }
}

/* =================================================
   LESSON VIDEO – SIZE FIX
================================================= */

.lesson-video-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

/* Video gerçekten büyük görünsün */
.lesson-video-card video {
    width: 100%;
    height: auto;
    max-height: 560px;
    /* 🔥 büyütüldü */
    aspect-ratio: 16 / 9;
    /* stabil oran */
    background: #000;
    display: block;
}

/* Mobilde aşırı büyümesin */
@media (max-width: 768px) {
    .lesson-video-card video {
        max-height: 300px;
    }
}

/* =================================================
   LESSON HEADER – TITLE / START / DATE LAYOUT
================================================= */

.lesson-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* ---------- ÜST SATIR ---------- */
.lesson-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Sol: Title + start */
.lesson-title-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.lesson-title-left h2 {
    font-size: 1.35rem;
    font-weight: 600;
    margin: 0;
}

/* küçük START badge */
.lesson-start-badge {
    font-size: 0.7rem;
    padding: 3px 8px;
    border-radius: 999px;
    background: var(--accent-light);
    color: var(--accent);
    font-weight: 600;
}

/* ---------- ALT SATIR ---------- */
.lesson-header-bottom {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 14px;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* Tarih */
.lesson-date {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Öğrenci paneline dön */
.lesson-back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--accent);
    font-weight: 500;
    transition: var(--transition);
}

.lesson-back-link:hover {
    text-decoration: underline;
}

/* =================================================
   MOBILE HEADER FIX
================================================= */

@media (max-width: 768px) {
    .lesson-title-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .lesson-header-bottom {
        justify-content: flex-start;
    }
}

/* ================================
   LESSON HEADER – FINAL LAYOUT
================================ */

.lesson-header {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Başlık */
.lesson-title {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

/* Açıklama */
.lesson-desc {
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--text-secondary);
    margin: 0;
}

/* Alt satır (tarih + geri dön) */
.lesson-meta-row {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 18px;
    font-size: 0.75rem;
    color: var(--text-secondary);
    padding-top: 6px;
}

/* Tarih */
.lesson-date {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Geri dönüş linki */
.lesson-back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--accent);
    font-weight: 500;
    transition: var(--transition);
}

.lesson-back-link:hover {
    text-decoration: underline;
}

/* ================= MOBILE ================= */

@media (max-width: 768px) {
    .lesson-meta-row {
        justify-content: flex-start;
        gap: 12px;
    }
}