/* =========================================================
   Global styles
========================================================= */

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: #f8fafc;
    color: #0f172a;
}

a {
    text-decoration: none;
    color: inherit;
}

.container {
    width: min(1180px, 92%);
    margin: 0 auto;
}

/* =========================================================
   Public header
========================================================= */

.public-header {
    width: 100%;
    background: rgba(255, 255, 255, 0.92);
    border-bottom: 1px solid #e5e7eb;
    backdrop-filter: blur(14px);
    position: sticky;
    top: 0;
    z-index: 50;
}

.header-content {
    height: 76px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 20px;
    color: #1e293b;
}

.logo-icon {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 19px;
    box-shadow: 0 10px 25px rgba(37, 99, 235, 0.25);
}

.public-nav {
    display: flex;
    align-items: center;
    gap: 10px;
}

.public-nav a {
    padding: 9px 13px;
    border-radius: 12px;
    font-size: 14px;
    color: #475569;
    transition: 0.2s ease;
}

.public-nav a:hover {
    background: #eff6ff;
    color: #2563eb;
}

.public-nav .login-link {
    background: #2563eb;
    color: #ffffff;
    font-weight: 700;
    padding: 11px 18px;
}

.public-nav .login-link:hover {
    background: #1d4ed8;
    color: #ffffff;
}

/* =========================================================
   Hero section
========================================================= */

.hero-section {
    padding: 90px 0 80px;
    background:
        radial-gradient(circle at top left, rgba(37, 99, 235, 0.16), transparent 32%),
        radial-gradient(circle at bottom right, rgba(124, 58, 237, 0.14), transparent 34%),
        linear-gradient(135deg, #f8fafc, #eef2ff);
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.08fr 0.92fr;
    align-items: center;
    gap: 48px;
}

.hero-badge {
    display: inline-flex;
    padding: 9px 15px;
    background: #dbeafe;
    color: #1d4ed8;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 22px;
}

.hero-text h1 {
    margin: 0;
    font-size: clamp(38px, 5vw, 62px);
    line-height: 1.06;
    letter-spacing: -1.6px;
    color: #0f172a;
}

.hero-text p {
    max-width: 640px;
    margin: 24px 0 0;
    font-size: 18px;
    line-height: 1.75;
    color: #475569;
}

.hero-actions {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 34px;
    flex-wrap: wrap;
}

.btn-primary,
.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 13px 24px;
    border-radius: 15px;
    font-size: 15px;
    font-weight: 800;
    transition: 0.22s ease;
}

.btn-primary {
    background: linear-gradient(135deg, #2563eb, #4f46e5);
    color: #ffffff;
    box-shadow: 0 15px 30px rgba(37, 99, 235, 0.28);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 40px rgba(37, 99, 235, 0.36);
}

.btn-secondary {
    background: #ffffff;
    color: #1e293b;
    border: 1px solid #e2e8f0;
}

.btn-secondary:hover {
    transform: translateY(-2px);
    border-color: #bfdbfe;
    color: #2563eb;
}

/* =========================================================
   Hero upload preview card
========================================================= */

.hero-card {
    background: rgba(255, 255, 255, 0.75);
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 34px;
    padding: 28px;
    box-shadow: 0 30px 70px rgba(15, 23, 42, 0.12);
    backdrop-filter: blur(18px);
}

.upload-preview {
    min-height: 390px;
    border-radius: 28px;
    background:
        linear-gradient(135deg, rgba(239, 246, 255, 0.95), rgba(255, 255, 255, 0.95));
    border: 2px dashed #93c5fd;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 34px;
    text-align: center;
}

.upload-icon {
    width: 86px;
    height: 86px;
    border-radius: 28px;
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 38px;
    margin-bottom: 20px;
    box-shadow: 0 20px 40px rgba(37, 99, 235, 0.28);
}

.upload-preview h3 {
    margin: 0;
    font-size: 26px;
    color: #1e293b;
}

.upload-preview p {
    margin: 13px 0 0;
    font-size: 15px;
    line-height: 1.65;
    color: #64748b;
}

.fake-progress {
    width: 100%;
    height: 12px;
    background: #dbeafe;
    border-radius: 999px;
    margin: 28px 0 20px;
    overflow: hidden;
}

.fake-progress-line {
    width: 72%;
    height: 100%;
    background: linear-gradient(90deg, #2563eb, #22c55e);
    border-radius: 999px;
}

.status-list {
    width: 100%;
    display: grid;
    gap: 11px;
    text-align: left;
    color: #334155;
    font-size: 14px;
    font-weight: 700;
}

.status-list div {
    background: #ffffff;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid #e2e8f0;
}

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

.dot.blue {
    background: #2563eb;
}

.dot.yellow {
    background: #f59e0b;
}

.dot.green {
    background: #22c55e;
}

/* =========================================================
   Features section
========================================================= */

.features-section {
    padding: 82px 0;
    background: #ffffff;
}

.section-title {
    max-width: 760px;
    margin: 0 auto 42px;
    text-align: center;
}

.section-title h2 {
    margin: 0;
    font-size: clamp(30px, 4vw, 44px);
    color: #0f172a;
    letter-spacing: -0.7px;
}

.section-title p {
    margin: 15px 0 0;
    font-size: 17px;
    line-height: 1.7;
    color: #64748b;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 22px;
}

.feature-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 24px;
    padding: 28px 24px;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.06);
    transition: 0.22s ease;
}

.feature-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 26px 55px rgba(15, 23, 42, 0.1);
    border-color: #bfdbfe;
}

.feature-icon {
    width: 58px;
    height: 58px;
    border-radius: 18px;
    background: #eff6ff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin-bottom: 18px;
}

.feature-card h3 {
    margin: 0;
    font-size: 19px;
    color: #1e293b;
}

.feature-card p {
    margin: 12px 0 0;
    font-size: 15px;
    line-height: 1.65;
    color: #64748b;
}

/* =========================================================
   Workflow section
========================================================= */

.workflow-section {
    padding: 82px 0;
    background:
        radial-gradient(circle at top right, rgba(37, 99, 235, 0.12), transparent 35%),
        #f8fafc;
}

.workflow-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 22px;
}

.workflow-step {
    position: relative;
    background: #ffffff;
    border-radius: 24px;
    padding: 30px 24px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.06);
}

.workflow-step span {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    background: linear-gradient(135deg, #2563eb, #4f46e5);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    margin-bottom: 18px;
    box-shadow: 0 12px 25px rgba(37, 99, 235, 0.25);
}

.workflow-step h3 {
    margin: 0;
    font-size: 19px;
    color: #1e293b;
}

.workflow-step p {
    margin: 12px 0 0;
    font-size: 15px;
    line-height: 1.65;
    color: #64748b;
}

/* =========================================================
   Footer
========================================================= */

.public-footer {
    background: #0f172a;
    color: #cbd5e1;
    padding: 28px 0;
    text-align: center;
}

.public-footer p {
    margin: 0;
    font-size: 14px;
}

/* =========================================================
   Forms and cards for later pages
========================================================= */

.page-container {
    width: min(1100px, 92%);
    margin: 40px auto;
}

.login-card,
.upload-card,
.admin-card {
    background: #ffffff;
    border-radius: 24px;
    padding: 34px;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.08);
    border: 1px solid #e5e7eb;
}

input,
textarea,
select {
    width: 100%;
    padding: 13px 15px;
    border-radius: 13px;
    border: 1px solid #cbd5e1;
    outline: none;
    font-size: 15px;
    margin: 8px 0 16px;
    background: #ffffff;
}

input:focus,
textarea:focus,
select:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

label {
    font-size: 14px;
    font-weight: 700;
    color: #334155;
}

/* =========================================================
   Tables for later pages
========================================================= */

.data-table {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(15, 23, 42, 0.08);
}

.data-table th,
.data-table td {
    padding: 14px 16px;
    border-bottom: 1px solid #e5e7eb;
    text-align: left;
    font-size: 14px;
}

.data-table th {
    background: #f1f5f9;
    color: #334155;
    font-weight: 800;
}

.data-table tr:hover td {
    background: #f8fafc;
}

/* =========================================================
   Status badges for later pages
========================================================= */

.status {
    display: inline-flex;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
}

.status-uploaded {
    background: #dbeafe;
    color: #1d4ed8;
}

.status-sent_to_processing,
.status-processing {
    background: #fef3c7;
    color: #92400e;
}

.status-completed {
    background: #dcfce7;
    color: #166534;
}

.status-failed {
    background: #fee2e2;
    color: #991b1b;
}

.status-expired {
    background: #e5e7eb;
    color: #374151;
}

/* =========================================================
   Responsive design
========================================================= */

@media (max-width: 980px) {
    .hero-grid,
    .features-grid,
    .workflow-grid {
        grid-template-columns: 1fr 1fr;
    }

    .hero-grid {
        gap: 34px;
    }
}

@media (max-width: 680px) {
    .header-content {
        height: auto;
        padding: 16px 0;
        align-items: flex-start;
        gap: 16px;
        flex-direction: column;
    }

    .public-nav {
        width: 100%;
        flex-wrap: wrap;
    }

    .hero-section {
        padding: 58px 0;
    }

    .hero-grid,
    .features-grid,
    .workflow-grid {
        grid-template-columns: 1fr;
    }

    .hero-card {
        padding: 18px;
        border-radius: 24px;
    }

    .upload-preview {
        min-height: 320px;
        padding: 24px;
    }

    .hero-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .btn-primary,
    .btn-secondary {
        width: 100%;
    }

    .data-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}
/* =========================================================
   Admin dashboard
========================================================= */

.admin-page-title {
    margin-bottom: 28px;
}

.admin-page-title h1 {
    margin: 0;
    font-size: 34px;
    color: #0f172a;
}

.admin-page-title p {
    margin: 10px 0 0;
    color: #64748b;
    line-height: 1.6;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 18px;
    margin-bottom: 26px;
}

.stat-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 22px;
    padding: 22px;
    box-shadow: 0 15px 35px rgba(15, 23, 42, 0.06);
}

.stat-icon {
    display: inline-flex;
    width: 44px;
    height: 44px;
    border-radius: 15px;
    align-items: center;
    justify-content: center;
    background: #eff6ff;
    font-size: 23px;
    margin-bottom: 13px;
}

.stat-card h3 {
    margin: 0;
    font-size: 14px;
    color: #64748b;
}

.stat-card strong {
    display: block;
    margin-top: 9px;
    font-size: 30px;
    color: #0f172a;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 22px;
    margin-bottom: 24px;
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 18px;
}

.card-header h2 {
    margin: 0;
    font-size: 22px;
    color: #0f172a;
}

.card-header a {
    color: #2563eb;
    font-weight: 700;
    font-size: 14px;
}

.quick-actions {
    display: grid;
    gap: 14px;
}

.quick-action-card {
    display: block;
    padding: 18px;
    border-radius: 18px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    transition: 0.2s ease;
}

.quick-action-card:hover {
    transform: translateY(-2px);
    border-color: #bfdbfe;
    background: #eff6ff;
}

.quick-action-card span {
    font-size: 26px;
}

.quick-action-card strong {
    display: block;
    margin-top: 8px;
    color: #0f172a;
}

.quick-action-card small {
    display: block;
    margin-top: 5px;
    color: #64748b;
    line-height: 1.5;
}

@media (max-width: 1100px) {
    .stats-grid {
        grid-template-columns: repeat(3, 1fr);
    }

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

@media (max-width: 680px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
}
/* =========================================================
   Filters and page title row
========================================================= */

.page-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.filter-form {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr 0.9fr auto;
    gap: 16px;
    align-items: end;
}

.filter-actions {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
}

.full-width {
    width: 100%;
}

.alert {
    padding: 14px 16px;
    border-radius: 14px;
    margin-bottom: 18px;
    font-weight: 700;
    font-size: 14px;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.alert-success {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

@media (max-width: 980px) {
    .page-title-row {
        align-items: flex-start;
        flex-direction: column;
    }

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

    .filter-actions {
        margin-bottom: 0;
    }
}
/* =========================================================
   Form layouts
========================================================= */

.form-card {
    max-width: 900px;
}

.form-grid {
    display: grid;
    gap: 18px;
}

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

.form-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 12px;
    flex-wrap: wrap;
}

@media (max-width: 760px) {
    .form-grid.two-columns {
        grid-template-columns: 1fr;
    }
}
/* =========================================================
   User edit meta box
========================================================= */

.user-meta-box {
    margin: 8px 0 18px;
    padding: 14px 16px;
    border-radius: 14px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    color: #475569;
    font-size: 14px;
}
/* =========================================================
   Tariff plan cards
========================================================= */

.tariff-filter-form {
    grid-template-columns: 1.4fr 0.8fr auto;
}

.tariff-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
    margin-top: 24px;
}

.tariff-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 24px;
    padding: 24px;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.06);
    transition: 0.22s ease;
}

.tariff-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 24px 55px rgba(15, 23, 42, 0.1);
    border-color: #bfdbfe;
}

.tariff-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.tariff-card-header h2 {
    margin: 0 0 10px;
    font-size: 24px;
    color: #0f172a;
}

.tariff-edit-link {
    color: #2563eb;
    font-weight: 800;
    font-size: 14px;
}

.tariff-description {
    min-height: 48px;
    margin: 18px 0;
    color: #64748b;
    line-height: 1.6;
    font-size: 15px;
}

.tariff-limits {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.tariff-limits div {
    background: #f8fafc;
    border-radius: 16px;
    padding: 14px;
    border: 1px solid #e5e7eb;
}

.tariff-limits span {
    display: block;
    font-size: 13px;
    color: #64748b;
    margin-bottom: 7px;
}

.tariff-limits strong {
    display: block;
    color: #0f172a;
    font-size: 20px;
}

.tariff-footer {
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid #e5e7eb;
    color: #64748b;
    font-size: 13px;
}

@media (max-width: 1100px) {
    .tariff-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 760px) {
    .tariff-filter-form,
    .tariff-grid {
        grid-template-columns: 1fr;
    }
}
/* =========================================================
   User dashboard
========================================================= */

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

.stat-card small {
    display: block;
    margin-top: 8px;
    color: #64748b;
    font-size: 13px;
}

@media (max-width: 980px) {
    .user-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 680px) {
    .user-stats-grid {
        grid-template-columns: 1fr;
    }
}/* =========================================================
   User upload page
========================================================= */

.upload-layout {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 24px;
    align-items: start;
}

.upload-main-card {
    padding: 30px;
}

.upload-drop-zone {
    display: flex;
    min-height: 260px;
    border: 2px dashed #93c5fd;
    background: linear-gradient(135deg, #eff6ff, #ffffff);
    border-radius: 24px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    text-align: center;
    cursor: pointer;
    padding: 30px;
    margin-bottom: 20px;
    transition: 0.22s ease;
}

.upload-drop-zone:hover {
    border-color: #2563eb;
    background: #eff6ff;
}

.upload-drop-zone input {
    display: none;
}

.upload-drop-icon {
    width: 76px;
    height: 76px;
    border-radius: 24px;
    background: linear-gradient(135deg, #2563eb, #4f46e5);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 34px;
    margin-bottom: 18px;
    box-shadow: 0 18px 35px rgba(37, 99, 235, 0.28);
}

.upload-drop-zone strong {
    display: block;
    font-size: 22px;
    color: #0f172a;
    margin-bottom: 8px;
}

.upload-drop-zone small {
    max-width: 460px;
    color: #64748b;
    line-height: 1.6;
}

.selected-file-box {
    padding: 14px 16px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    margin-bottom: 18px;
    color: #334155;
}

.image-preview-box {
    margin-bottom: 20px;
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
    background: #f8fafc;
}

.image-preview-box img {
    display: block;
    width: 100%;
    max-height: 360px;
    object-fit: contain;
}

.upload-info-card {
    position: sticky;
    top: 96px;
}

.upload-limit-list {
    display: grid;
    gap: 14px;
}

.upload-limit-list div {
    padding: 16px;
    background: #f8fafc;
    border-radius: 16px;
    border: 1px solid #e5e7eb;
}

.upload-limit-list span {
    display: block;
    color: #64748b;
    font-size: 13px;
    margin-bottom: 7px;
}

.upload-limit-list strong {
    display: block;
    color: #0f172a;
    font-size: 20px;
}

.upload-limit-list small {
    display: block;
    margin-top: 6px;
    color: #64748b;
}

.upload-note {
    margin-top: 18px;
    padding: 15px;
    border-radius: 15px;
    background: #eff6ff;
    color: #1e40af;
    line-height: 1.6;
    font-size: 14px;
}

button:disabled,
.btn-primary:disabled {
    cursor: not-allowed;
    opacity: 0.6;
    box-shadow: none;
}

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

    .upload-info-card {
        position: static;
    }
}
/* =========================================================
   Uploads list page
========================================================= */

.uploads-filter-form {
    grid-template-columns: 1.3fr 0.8fr auto;
}

.error-text {
    color: #dc2626;
    font-weight: 700;
}

.table-action-link {
    color: #2563eb;
    font-weight: 800;
}

.table-action-link:hover {
    text-decoration: underline;
}

@media (max-width: 900px) {
    .uploads-filter-form {
        grid-template-columns: 1fr;
    }
}
/* =========================================================
   Result page
========================================================= */

.result-layout {
    display: grid;
    grid-template-columns: 1.25fr 0.75fr;
    gap: 24px;
    align-items: start;
}

.result-image-card h2,
.result-details-card h2 {
    display: flex;
    align-items: center;
    gap: 10px;
}

.result-image-wrapper {
    width: 100%;
    border-radius: 22px;
    overflow: hidden;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
}

.result-image-wrapper img {
    display: block;
    width: 100%;
    max-height: 650px;
    object-fit: contain;
}

.result-detail-list {
    display: grid;
    gap: 14px;
}

.result-detail-list div {
    padding: 15px;
    border-radius: 16px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
}

.result-detail-list span {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #64748b;
    font-size: 13px;
    margin-bottom: 7px;
}

.result-detail-list strong {
    display: block;
    color: #0f172a;
    font-size: 15px;
    word-break: break-word;
}

.small-btn {
    min-height: 40px;
    padding: 10px 16px;
    font-size: 14px;
    gap: 8px;
}

@media (max-width: 900px) {
    .result-layout {
        grid-template-columns: 1fr;
    }
}
/* =========================================================
   Admin uploads monitor
========================================================= */

.upload-monitor-stats {
    grid-template-columns: repeat(4, 1fr);
}

.monitor-filter-form {
    grid-template-columns: 1.2fr 1fr 0.8fr 0.75fr 0.75fr auto;
}

.stat-icon i {
    color: #2563eb;
}

@media (max-width: 1200px) {
    .monitor-filter-form {
        grid-template-columns: 1fr 1fr;
    }

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

@media (max-width: 680px) {
    .monitor-filter-form,
    .upload-monitor-stats {
        grid-template-columns: 1fr;
    }
}