@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
    --navy: #0a2463;
    --blue: #2563eb;
    --green: #16a34a;
    --red: #dc2626;
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-500: #64748b;
    --gray-700: #334155;
    --gray-900: #0f172a;
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--gray-50);
    color: var(--gray-900);
    line-height: 1.5;
}

/* Login */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--navy) 0%, #1e56a0 100%);
}

.login-card {
    background: #fff;
    border-radius: 16px;
    padding: 40px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    text-align: center;
}

.section-title.purple { color: #7c3aed; border-bottom-color: #ede9fe; }
.section-title.orange { color: #ea580c; border-bottom-color: #ffedd5; }

.login-logo-img {
    height: 80px;
    width: auto;
    margin: 0 auto 16px;
    display: block;
}

.login-card h1 {
    font-size: 22px;
    font-weight: 800;
    margin-bottom: 4px;
}

.login-sub {
    color: var(--gray-500);
    font-size: 13px;
    margin-bottom: 24px;
}

.login-form {
    text-align: left;
}

.login-hint {
    margin-top: 16px;
    font-size: 11px;
    color: var(--gray-500);
}

.back-link {
    display: inline-block;
    margin-top: 16px;
    font-size: 13px;
    color: var(--blue);
    text-decoration: none;
}

.back-link:hover {
    text-decoration: underline;
}

/* Nav */
.admin-nav {
    background: var(--navy);
    color: #fff;
    padding: 12px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 15px;
}

.nav-logo {
    width: 32px;
    height: 32px;
    background: var(--red);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 16px;
}

.nav-actions {
    display: flex;
    gap: 8px;
}

/* Container */
.admin-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 24px 20px 60px;
}

/* Sections */
.admin-section {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    border: 1px solid var(--gray-200);
}

.section-title {
    font-size: 18px;
    font-weight: 800;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--gray-200);
    color: var(--navy);
}

.section-title.blue {
    color: var(--blue);
    border-bottom-color: #dbeafe;
}

.section-title.green {
    color: var(--green);
    border-bottom-color: #dcfce7;
}

.section-title.red {
    color: #dc2626;
    border-bottom-color: #fee2e2;
}

.section-title.teal {
    color: #0891b2;
    border-bottom-color: #cffafe;
}

.subsection-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--gray-700);
    margin: 16px 0 12px;
}

/* Forms */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group label {
    font-size: 12px;
    font-weight: 600;
    color: var(--gray-700);
}

.form-group input,
.form-group textarea,
.form-group select {
    padding: 8px 12px;
    border: 1px solid var(--gray-300);
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.2s;
    background: #fff;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 60px;
}

.input-with-upload {
    display: flex;
    gap: 8px;
    align-items: center;
}

.input-with-upload input[type="text"] {
    flex: 1;
}

.input-with-upload input[type="file"] {
    font-size: 12px;
    max-width: 140px;
}

.preview-img {
    margin-top: 8px;
    max-width: 120px;
    max-height: 80px;
    border-radius: 6px;
    border: 1px solid var(--gray-200);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
    font-family: inherit;
}

.btn-primary {
    background: var(--blue);
    color: #fff;
}

.btn-primary:hover {
    background: #1d4ed8;
}

.btn-outline {
    background: transparent;
    color: #fff;
    border: 1px solid rgba(255,255,255,0.3);
}

.btn-outline:hover {
    background: rgba(255,255,255,0.1);
}

.btn-danger {
    background: var(--red);
    color: #fff;
}

.btn-danger:hover {
    background: #b91c1c;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

.btn-lg {
    padding: 12px 32px;
    font-size: 16px;
}

.btn-block {
    width: 100%;
}

.form-actions {
    text-align: center;
    padding: 20px 0;
}

/* Alerts */
.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    font-weight: 500;
}

.alert-success {
    background: #dcfce7;
    color: #15803d;
    border: 1px solid #86efac;
}

.alert-error {
    background: #fee2e2;
    color: #b91c1c;
    border: 1px solid #fca5a5;
}

.section-title.gold {
    color: #b45309;
    border-bottom-color: #fde68a;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.pricing-admin-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.pricing-admin-hint {
    color: var(--gray-500);
    font-size: 13px;
    margin: -8px 0 20px;
}

.pricing-admin-layout {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 24px;
    align-items: start;
}

.pricing-pkg-editor {
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    margin-top: 28px;
}

.checkbox-label input {
    width: auto;
}

.pricing-features-input {
    font-family: inherit;
    line-height: 1.6;
}

.pricing-admin-preview {
    position: sticky;
    top: 20px;
    background: #0a1628;
    color: #fff;
    border-radius: 16px;
    padding: 20px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
}

.pricing-preview-title {
    font-size: 14px;
    font-weight: 700;
    color: #fdba74;
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pricing-preview-cards {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.pricing-preview-card {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 12px;
    padding: 14px;
    position: relative;
}

.pricing-preview-card--featured {
    border-color: rgba(249, 115, 22, 0.5);
    box-shadow: 0 0 0 1px rgba(249, 115, 22, 0.2);
}

.pricing-preview-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #f97316;
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 50px;
    text-transform: uppercase;
}

.pricing-preview-card h4 {
    font-size: 15px;
    margin-bottom: 4px;
}

.pricing-preview-price {
    font-size: 18px;
    font-weight: 800;
    color: #fdba74;
}

.pricing-preview-note {
    font-size: 11px;
    color: rgba(255,255,255,0.55);
    margin-bottom: 8px;
}

.pricing-preview-desc {
    font-size: 12px;
    color: rgba(255,255,255,0.75);
    margin-bottom: 8px;
    line-height: 1.5;
}

.pricing-preview-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.pricing-preview-card li {
    font-size: 11px;
    color: rgba(255,255,255,0.85);
    padding: 4px 0 4px 14px;
    position: relative;
}

.pricing-preview-card li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #22c55e;
    font-size: 10px;
}

.pricing-preview-addons {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.pricing-preview-addons h4 {
    font-size: 12px;
    color: #fdba74;
    margin-bottom: 8px;
}

.pricing-preview-addons ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.pricing-preview-addons li {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    font-size: 11px;
    padding: 5px 0;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.pricing-preview-addons strong {
    color: #fdba74;
    white-space: nowrap;
}

.pricing-admin-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.pricing-pdf-export {
    position: fixed;
    left: -10000px;
    top: 0;
    width: 794px;
    background: #ffffff;
    color: #0a1628;
    font-family: 'Segoe UI', system-ui, sans-serif;
    z-index: -1;
    pointer-events: none;
}

.pricing-pdf-inner {
    padding: 40px 36px;
}

.pricing-pdf-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 28px;
    padding-bottom: 18px;
    border-bottom: 3px solid #f97316;
}

.pricing-pdf-brand img {
    height: 48px;
    width: auto;
    object-fit: contain;
}

.pricing-pdf-brand-text strong {
    display: block;
    font-size: 22px;
    color: #0a1628;
}

.pricing-pdf-brand-text span {
    font-size: 11px;
    color: #64748b;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.pricing-pdf-head h1 {
    font-size: 26px;
    font-weight: 800;
    color: #0a1628;
    margin-bottom: 8px;
    line-height: 1.25;
}

.pricing-pdf-head p {
    font-size: 13px;
    color: #475569;
    line-height: 1.6;
    margin-bottom: 24px;
}

.pricing-pdf-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-bottom: 22px;
}

.pricing-pdf-card {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px 14px;
    background: #f8fafc;
    position: relative;
    min-height: 100%;
}

.pricing-pdf-card--featured {
    border-color: #f97316;
    background: #fff7ed;
    box-shadow: 0 0 0 1px rgba(249, 115, 22, 0.15);
}

.pricing-pdf-card-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #f97316;
    color: #fff;
    font-size: 8px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 50px;
    text-transform: uppercase;
}

.pricing-pdf-card h3 {
    font-size: 15px;
    font-weight: 800;
    color: #0a1628;
    margin-bottom: 6px;
    padding-right: 50px;
}

.pricing-pdf-card-price {
    font-size: 18px;
    font-weight: 800;
    color: #ea580c;
    margin-bottom: 2px;
}

.pricing-pdf-card-note {
    font-size: 10px;
    color: #64748b;
    margin-bottom: 8px;
}

.pricing-pdf-card-desc {
    font-size: 10px;
    color: #475569;
    line-height: 1.5;
    margin-bottom: 10px;
}

.pricing-pdf-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.pricing-pdf-card li {
    font-size: 9.5px;
    color: #334155;
    padding: 3px 0 3px 14px;
    position: relative;
    line-height: 1.4;
}

.pricing-pdf-card li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #16a34a;
    font-weight: 700;
    font-size: 9px;
}

.pricing-pdf-addons {
    margin-bottom: 20px;
    padding: 14px 16px;
    background: #f1f5f9;
    border-radius: 10px;
}

.pricing-pdf-addons h4 {
    font-size: 12px;
    font-weight: 800;
    color: #0a1628;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pricing-pdf-addons table {
    width: 100%;
    border-collapse: collapse;
    font-size: 10px;
}

.pricing-pdf-addons td {
    padding: 6px 0;
    border-bottom: 1px solid #e2e8f0;
    color: #334155;
}

.pricing-pdf-addons td:last-child {
    text-align: right;
    font-weight: 700;
    color: #ea580c;
    white-space: nowrap;
}

.pricing-pdf-footer {
    font-size: 10px;
    color: #64748b;
    line-height: 1.6;
    padding-top: 14px;
    border-top: 1px solid #e2e8f0;
}

@media (max-width: 1100px) {
    .pricing-admin-layout {
        grid-template-columns: 1fr;
    }

    .pricing-admin-preview {
        position: static;
        max-height: none;
    }
}

@media (max-width: 640px) {
    .form-grid {
        grid-template-columns: 1fr;
    }

    .admin-nav {
        flex-direction: column;
        gap: 10px;
    }
}
