/* ==========================================
   Carousel Generator — App Stylesheet
   Dark Theme, Modern, Responsive
   ========================================== */

/* --- Google Fonts (lokal, DSGVO-konform) --- */
@font-face {
    font-family: 'Playfair Display';
    font-style: normal;
    font-weight: 700 800;
    font-display: swap;
    src: url('../fonts/playfair-display.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Playfair Display';
    font-style: normal;
    font-weight: 700 800;
    font-display: swap;
    src: url('../fonts/playfair-display-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: 'DM Sans';
    font-style: normal;
    font-weight: 300 700;
    font-display: swap;
    src: url('../fonts/dm-sans-regular.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'DM Sans';
    font-style: normal;
    font-weight: 300 700;
    font-display: swap;
    src: url('../fonts/dm-sans-regular-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* --- CSS Variables --- */
:root {
    --color-bg: #0f172a;
    --color-bg-alt: #1e293b;
    --color-bg-card: #1e293b;
    --color-bg-input: #0f172a;
    --color-border: #334155;
    --color-border-focus: #3b82f6;
    --color-text: #f1f5f9;
    --color-text-muted: #94a3b8;
    --color-text-dim: #64748b;
    --color-primary: #3b82f6;
    --color-primary-hover: #2563eb;
    --color-primary-dark: #1d4ed8;
    --color-success: #10b981;
    --color-success-bg: rgba(16, 185, 129, 0.1);
    --color-error: #ef4444;
    --color-error-bg: rgba(239, 68, 68, 0.1);
    --color-warning: #f59e0b;
    --color-accent: #8b5cf6;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.5);
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --transition: 0.2s ease;
}

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

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-family);
    background: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    min-height: 100vh;
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--transition);
}

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

img {
    max-width: 100%;
    height: auto;
}

/* --- Typography --- */
h1, h2, h3, h4 {
    font-weight: 600;
    line-height: 1.3;
    color: var(--color-text);
}

h1 { font-size: 1.75rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }

.text-muted {
    color: var(--color-text-muted);
}

/* --- Container --- */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

/* --- Navbar --- */
.navbar {
    background: var(--color-bg-alt);
    border-bottom: 1px solid var(--color-border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    height: 60px;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--color-text);
    font-weight: 700;
    font-size: 1.1rem;
}

.navbar-brand:hover {
    color: var(--color-text);
}

.brand-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    color: #fff;
    font-weight: 800;
    font-size: 0.9rem;
    border-radius: var(--radius-sm);
}

.brand-icon-lg {
    width: 48px;
    height: 48px;
    font-size: 1.3rem;
    border-radius: var(--radius-md);
}

.brand-text {
    display: none;
}

@media (min-width: 640px) {
    .brand-text {
        display: inline;
    }
}

.navbar-menu {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav-link {
    color: var(--color-text-muted);
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0.5rem 0;
    transition: color var(--transition);
}

.nav-link:hover,
.nav-link.active {
    color: var(--color-text);
}

.nav-link.active {
    border-bottom: 2px solid var(--color-primary);
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding-left: 1rem;
    border-left: 1px solid var(--color-border);
}

.nav-user-name {
    color: var(--color-text-muted);
    font-size: 0.85rem;
    display: none;
}

@media (min-width: 640px) {
    .nav-user-name {
        display: inline;
    }
}

.nav-logout {
    color: var(--color-text-dim) !important;
    font-size: 0.85rem;
}

.nav-logout:hover {
    color: var(--color-error) !important;
}

/* --- Alerts / Flash Messages --- */
.alert {
    max-width: 1100px;
    margin: 1rem auto 0;
    padding: 0.875rem 1.25rem;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.alert-success {
    background: var(--color-success-bg);
    border: 1px solid var(--color-success);
    color: var(--color-success);
}

.alert-error {
    background: var(--color-error-bg);
    border: 1px solid var(--color-error);
    color: var(--color-error);
}

.alert-close {
    background: none;
    border: none;
    color: inherit;
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0.7;
    padding: 0;
    line-height: 1;
}

.alert-close:hover {
    opacity: 1;
}

.error-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.error-list li {
    padding: 0.15rem 0;
}

.error-list li::before {
    content: "\2022 ";
    margin-right: 0.4rem;
}

/* --- Auth Pages --- */
.auth-body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 2rem 1rem;
    background: var(--color-bg);
    background-image:
        radial-gradient(ellipse at 20% 50%, rgba(59, 130, 246, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(139, 92, 246, 0.06) 0%, transparent 50%);
}

.auth-container {
    width: 100%;
    max-width: 420px;
}

.auth-card {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 2.5rem 2rem;
    box-shadow: var(--shadow-lg);
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.auth-app-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-text);
}

.auth-title {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--color-text-muted);
}

.auth-description {
    color: var(--color-text-muted);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.auth-card .alert {
    margin: 0 0 1.5rem;
}

/* --- Forms --- */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 0;
}

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

.form-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--color-text-muted);
    margin-bottom: 0.4rem;
}

.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--color-bg-input);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    color: var(--color-text);
    font-family: var(--font-family);
    font-size: 0.95rem;
    transition: border-color var(--transition), box-shadow var(--transition);
    outline: none;
}

.form-input::placeholder {
    color: var(--color-text-dim);
}

.form-input:focus {
    border-color: var(--color-border-focus);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--radius-sm);
    font-family: var(--font-family);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    line-height: 1.4;
}

.btn-primary {
    background: var(--color-primary);
    color: #fff;
}

.btn-primary:hover {
    background: var(--color-primary-hover);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: var(--color-bg);
    color: var(--color-text-muted);
    border: 1px solid var(--color-border);
}

.btn-secondary:hover {
    background: var(--color-bg-alt);
    color: var(--color-text);
}

.btn-block {
    width: 100%;
    margin-top: 0.5rem;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
}

/* --- Auth Links --- */
.auth-links {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.85rem;
}

.auth-link {
    color: var(--color-text-muted);
}

.auth-link:hover {
    color: var(--color-primary);
}

.auth-separator {
    color: var(--color-text-dim);
    margin: 0 0.5rem;
}

/* --- Dashboard --- */
.dashboard-welcome {
    margin-bottom: 2.5rem;
}

.dashboard-welcome h1 {
    margin-bottom: 0.5rem;
}

.dashboard-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.card {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 1.75rem;
    transition: border-color var(--transition), transform var(--transition);
}

.card:hover {
    border-color: var(--color-border-focus);
    transform: translateY(-2px);
}

.card-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(59, 130, 246, 0.1);
    color: var(--color-primary);
    font-weight: 800;
    font-size: 1.2rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1rem;
}

.card h3 {
    margin-bottom: 0.5rem;
}

.card p {
    color: var(--color-text-muted);
    font-size: 0.9rem;
    margin-bottom: 1.25rem;
    line-height: 1.5;
}

/* --- Footer --- */
.footer {
    border-top: 1px solid var(--color-border);
    margin-top: auto;
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem;
    text-align: center;
}

.footer p {
    color: var(--color-text-dim);
    font-size: 0.8rem;
}

/* --- Main Content --- */
.main-content {
    flex: 1;
    min-height: calc(100vh - 60px - 80px);
}

/* --- Utility --- */
body {
    display: flex;
    flex-direction: column;
}

.auth-body {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* --- Responsive --- */
/* --- Brand Page --- */
.brand-page {
    max-width: 1000px;
    margin: 0 auto;
}

.brand-header {
    margin-bottom: 2rem;
}

.brand-header h1 {
    margin-bottom: 0.5rem;
}

.brand-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 2rem;
    align-items: start;
}

.brand-form-section {
    min-width: 0;
}

.brand-preview-section {
    position: sticky;
    top: 80px;
}

.form-section {
    margin-bottom: 2rem;
}

.form-section-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--color-border);
}

.color-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem;
}

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

.color-input-wrap {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.color-picker {
    width: 40px;
    height: 40px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    padding: 2px;
    background: var(--color-bg-input);
}

.color-hex {
    width: 90px;
    font-family: monospace;
    font-size: 0.85rem;
    text-transform: uppercase;
}

.form-select {
    appearance: auto;
    cursor: pointer;
}

.form-hint {
    font-size: 0.8rem;
    color: var(--color-text-dim);
    margin-top: 0.4rem;
}

.form-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--color-border);
}

/* --- Logo Upload --- */
.logo-current {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo-preview-img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: var(--color-bg-input);
}

.logo-upload-area {
    border: 2px dashed var(--color-border);
    border-radius: var(--radius-md);
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: border-color var(--transition);
}

.logo-upload-area:hover {
    border-color: var(--color-primary);
}

.logo-upload-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.logo-upload-icon {
    font-size: 2rem;
    color: var(--color-text-dim);
    line-height: 1;
}

.logo-upload-text {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-text-muted);
}

.logo-upload-hint {
    font-size: 0.75rem;
    color: var(--color-text-dim);
}

.file-input-hidden {
    display: none;
}

/* --- Brand Preview Slide --- */
.brand-preview-slide {
    aspect-ratio: 4 / 5;
    border-radius: var(--radius-md);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.preview-accent-bar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
}

.preview-logo {
    width: 40px;
    height: 40px;
    object-fit: contain;
    margin-bottom: 1rem;
    margin-top: 0.5rem;
}

.preview-logo-placeholder {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    margin-bottom: 1rem;
    margin-top: 0.5rem;
}

.preview-headline {
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 0.75rem;
}

.preview-body {
    font-size: 0.8rem;
    line-height: 1.5;
    flex: 1;
}

.preview-cta {
    display: inline-block;
    padding: 0.5rem 1.25rem;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 600;
    text-align: center;
    margin-top: auto;
    align-self: flex-start;
}

.preview-footer-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
}

/* --- Create Page --- */
.create-page {
    max-width: 560px;
    margin: 0 auto;
}

.create-header {
    margin-bottom: 2rem;
}

.create-header h1 {
    margin-bottom: 0.5rem;
}

.create-card {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 2rem;
}

/* --- Dashboard Grid (updated) --- */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.carousel-card {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: border-color var(--transition), transform var(--transition);
}

.carousel-card:hover {
    border-color: var(--color-border-focus);
    transform: translateY(-2px);
}

.carousel-card-preview {
    aspect-ratio: 4 / 5;
    max-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-text-dim);
    overflow: hidden;
}

.carousel-card-body {
    padding: 1rem 1.25rem;
}

.carousel-card-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.carousel-card-meta {
    font-size: 0.8rem;
    color: var(--color-text-dim);
    margin-bottom: 0.75rem;
}

.carousel-card-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.carousel-status {
    display: inline-block;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.15rem 0.5rem;
    border-radius: 100px;
}

.carousel-status-draft {
    background: rgba(245, 158, 11, 0.15);
    color: var(--color-warning);
}

.carousel-status-completed {
    background: var(--color-success-bg);
    color: var(--color-success);
}

/* --- Empty State --- */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--color-text-muted);
}

.empty-state-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.3;
}

.empty-state h3 {
    margin-bottom: 0.5rem;
    color: var(--color-text-muted);
}

.empty-state p {
    margin-bottom: 1.5rem;
    color: var(--color-text-dim);
}

/* --- Danger Button --- */
.btn-danger {
    background: transparent;
    color: var(--color-error);
    border: 1px solid var(--color-error);
}

.btn-danger:hover {
    background: var(--color-error-bg);
    color: var(--color-error);
}

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

    .brand-preview-section {
        position: static;
    }

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

/* --- Dashboard Toolbar --- */
.dashboard-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.dashboard-search-form {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
    min-width: 0;
}

.dashboard-search-input {
    max-width: 300px;
    padding: 0.5rem 0.75rem !important;
    font-size: 0.9rem !important;
}

.dashboard-sort {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.dashboard-sort-select {
    width: auto;
    padding: 0.5rem 0.75rem !important;
    font-size: 0.85rem !important;
}

/* --- Dashboard Quota --- */
.dashboard-quota {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    padding: 0.4rem 0.75rem;
    background: var(--color-bg-alt);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    white-space: nowrap;
}

/* --- Carousel Card Thumbnail --- */
.carousel-card-thumbnail {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.thumbnail-accent {
    height: 4px;
    width: 100%;
    flex-shrink: 0;
}

.thumbnail-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    text-align: center;
}

.thumbnail-headline {
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.3;
    word-wrap: break-word;
    overflow-wrap: break-word;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* --- Template Badge --- */
.carousel-template-badge {
    display: inline-block;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.1rem 0.4rem;
    background: rgba(139, 92, 246, 0.15);
    color: var(--color-accent);
    border-radius: 100px;
}

/* --- Export Button (Small / Dashboard) --- */
.btn-export-sm {
    background: linear-gradient(135deg, #10b981, #059669);
    color: #fff !important;
    border: none;
}

.btn-export-sm:hover {
    background: linear-gradient(135deg, #059669, #047857);
    color: #fff !important;
}

/* --- Pagination --- */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--color-border);
}

.pagination-info {
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

@media (max-width: 768px) {
    .dashboard-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .dashboard-search-form {
        flex-wrap: wrap;
    }

    .dashboard-search-input {
        max-width: none;
        flex: 1;
    }

    .pagination {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
}

@media (max-width: 480px) {
    .auth-card {
        padding: 2rem 1.5rem;
    }

    .container {
        padding: 1.5rem 1rem;
    }

    h1 { font-size: 1.4rem; }

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

/* ==========================================
   Phase 5: Subscription + Admin Styles
   ========================================== */

/* --- Plan Cards --- */
.plan-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.plan-card {
    background: var(--color-bg-card);
    border: 2px solid var(--color-border);
    border-radius: 12px;
    overflow: hidden;
    transition: border-color 0.2s;
}

.plan-card-active {
    border-color: var(--color-primary);
}

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

.plan-card-header h3 {
    margin: 0 0 0.5rem;
    font-size: 1.3rem;
}

.plan-price {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--color-primary);
}

.plan-card-body {
    padding: 1.5rem;
}

.plan-features {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem;
}

.plan-features li {
    padding: 0.4rem 0;
    color: var(--color-text-muted);
}

.plan-features li::before {
    content: '\2713 ';
    color: var(--color-success);
    margin-right: 0.5rem;
}

.plan-badge {
    display: inline-block;
    padding: 0.4rem 1rem;
    background: var(--color-primary);
    color: #fff;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.85rem;
}

.plan-badge-muted {
    background: var(--color-bg);
    color: var(--color-text-muted);
}

.btn-block {
    display: block;
    width: 100%;
    text-align: center;
}

/* --- Usage Section --- */
.usage-section {
    margin: 2rem 0;
    padding: 1.5rem;
    background: var(--color-bg-card);
    border-radius: 12px;
    border: 1px solid var(--color-border);
}

.usage-section h2 {
    margin-top: 0;
}

.usage-bars {
    display: grid;
    gap: 1.5rem;
}

.usage-item {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.usage-label {
    display: flex;
    justify-content: space-between;
    color: var(--color-text);
    font-weight: 500;
    font-size: 0.9rem;
}

.usage-bar {
    height: 10px;
    background: var(--color-bg);
    border-radius: 5px;
    overflow: hidden;
}

.usage-bar-fill {
    height: 100%;
    background: var(--color-primary);
    border-radius: 5px;
    transition: width 0.3s ease;
}

.usage-bar-full {
    background: var(--color-danger, #ef4444);
}

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

/* --- Subscription Details --- */
.subscription-details {
    margin: 2rem 0;
    padding: 1.5rem;
    background: var(--color-bg-card);
    border-radius: 12px;
    border: 1px solid var(--color-border);
}

.subscription-details h2 {
    margin-top: 0;
}

.details-table {
    width: 100%;
    border-collapse: collapse;
}

.details-table td {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--color-border);
}

.details-table td:first-child {
    color: var(--color-text-muted);
    width: 200px;
}

/* --- Badges --- */
.badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-success {
    background: rgba(16, 185, 129, 0.2);
    color: var(--color-success);
}

.badge-warning {
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
}

.badge-secondary {
    background: rgba(148, 163, 184, 0.2);
    color: var(--color-text-muted);
}

/* --- Admin Stats --- */
.admin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

.stat-card {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-primary);
}

.stat-label {
    color: var(--color-text-muted);
    font-size: 0.85rem;
    margin-top: 0.25rem;
}

/* --- Admin Table --- */
.admin-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--color-bg-card);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--color-border);
}

.admin-table thead th {
    background: var(--color-bg);
    color: var(--color-text-muted);
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--color-border);
}

.admin-table tbody td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--color-border);
    color: var(--color-text);
    font-size: 0.9rem;
}

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

.admin-table tbody tr:hover {
    background: rgba(59, 130, 246, 0.05);
}

/* --- Admin Section --- */
.admin-section {
    margin: 2rem 0;
}

/* --- Admin Nav Cards --- */
.admin-nav-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}

.admin-nav-card {
    display: block;
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: 1.5rem;
    text-decoration: none;
    color: var(--color-text);
    transition: border-color 0.2s, transform 0.1s;
}

.admin-nav-card:hover {
    border-color: var(--color-primary);
    transform: translateY(-2px);
}

.admin-nav-card h3 {
    margin: 0 0 0.5rem;
    color: var(--color-primary);
}

.admin-nav-card p {
    margin: 0;
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

/* --- Admin Form --- */
.admin-form {
    margin: 1.5rem 0;
}

.admin-form h2 {
    margin-top: 0;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--color-border);
}

/* --- Card --- */
.card {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    margin-bottom: 1.5rem;
}

.card-body {
    padding: 1.5rem;
}

/* --- Success Icon --- */
.success-icon {
    display: inline-block;
    width: 80px;
    height: 80px;
    line-height: 80px;
    border-radius: 50%;
    background: rgba(16, 185, 129, 0.2);
    color: var(--color-success);
    font-size: 2.5rem;
}

/* --- Responsive Admin --- */
@media (max-width: 768px) {
    .admin-table {
        display: block;
        overflow-x: auto;
    }

    .plan-cards {
        grid-template-columns: 1fr;
    }

    .admin-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}
