:root {
    --primary: #2ab9d9;
    --primary-dark: #1f9eb8;
    --bg: #f4f8fb;
    --surface: #ffffff;
    --text: #1f2937;
    --muted: #6b7280;
    --ok: #16a34a;
    --fail: #dc2626;
    --border: #e5e7eb;
    --shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Poppins", sans-serif;
    background: var(--bg);
    color: var(--text);
}

.page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.page-center {
    align-items: center;
    justify-content: center;
}

.header,
.footer,
.content {
    width: min(1100px, calc(100% - 32px));
    margin: 0 auto;
}

.header {
    padding: 24px 0 12px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-mark {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--primary);
    color: #fff;
    display: grid;
    place-items: center;
    font-weight: 700;
}

.brand small {
    display: block;
    color: var(--muted);
}

.content {
    flex: 1;
    padding: 24px 0 48px;
}

.footer {
    padding: 16px 0 32px;
    color: var(--muted);
    font-size: 14px;
}

.hero {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 32px;
    box-shadow: var(--shadow);
    margin-bottom: 24px;
}

.badge {
    display: inline-block;
    background: rgba(42, 185, 217, 0.12);
    color: var(--primary-dark);
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    margin: 0 0 12px;
}

.hero h1 {
    margin: 0 0 8px;
    font-size: clamp(28px, 4vw, 40px);
}

.lead {
    margin: 0;
    color: var(--muted);
    line-height: 1.6;
}

.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 20px;
    box-shadow: var(--shadow);
}

.card h2 {
    margin: 0 0 12px;
    font-size: 18px;
}

.card small {
    display: block;
    color: var(--muted);
    margin-top: 6px;
}

.status {
    margin: 0;
    font-weight: 600;
}

.status.ok {
    color: var(--ok);
}

.status.fail {
    color: var(--fail);
}

.next-steps {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px;
}

.next-steps h2 {
    margin-top: 0;
}

.next-steps ul {
    margin: 0;
    padding-left: 20px;
    line-height: 1.8;
}

.button {
    display: inline-block;
    margin-top: 16px;
    background: var(--primary);
    color: #fff;
    text-decoration: none;
    padding: 12px 18px;
    border-radius: 10px;
    font-weight: 600;
}

.button:hover {
    background: var(--primary-dark);
}

.button-outline {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.button-outline:hover {
    background: rgba(42, 185, 217, 0.08);
}

.button-full {
    width: 100%;
    margin-top: 8px;
}

.hero-actions {
    display: flex;
    gap: 12px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.auth-body {
    background: linear-gradient(135deg, #e8f7fb 0%, #f4f8fb 100%);
}

.auth-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
}

.auth-brand {
    display: none;
}

.auth-card {
    width: min(480px, 100%);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 32px;
    box-shadow: var(--shadow);
}

.auth-card h2 {
    margin: 0 0 8px;
}

.form {
    display: grid;
    gap: 16px;
    margin-top: 20px;
}

.form label {
    display: grid;
    gap: 6px;
    font-size: 14px;
    font-weight: 500;
}

.form input[type="text"],
.form input[type="email"],
.form input[type="password"],
.form input[type="file"] {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
    font: inherit;
}

.form label small {
    color: var(--muted);
    font-weight: 400;
}

.form-footer {
    margin-top: 20px;
    text-align: center;
    color: var(--muted);
    font-size: 14px;
}

.form-footer a {
    color: var(--primary-dark);
    font-weight: 600;
}

.alert {
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 14px;
    margin-bottom: 12px;
}

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

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

.alert ul {
    margin: 0;
    padding-left: 18px;
}

.register-options {
    display: grid;
    gap: 12px;
    margin-top: 20px;
}

.register-card {
    display: grid;
    gap: 4px;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 14px;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.register-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow);
}

.register-card span {
    color: var(--muted);
    font-size: 14px;
}

.panel-body {
    background: var(--bg);
}

.panel-layout {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 260px 1fr;
}

.sidebar {
    background: #0f172a;
    color: #fff;
    padding: 24px 18px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-nav {
    display: grid;
    gap: 6px;
}

.sidebar-nav a {
    color: #cbd5e1;
    text-decoration: none;
    padding: 10px 12px;
    border-radius: 10px;
    font-size: 14px;
}

.sidebar-nav a.active,
.sidebar-nav a:hover:not(.disabled) {
    background: rgba(42, 185, 217, 0.18);
    color: #fff;
}

.sidebar-nav a.disabled {
    opacity: 0.45;
    pointer-events: none;
}

.logout-form {
    margin-top: auto;
}

.panel-main {
    display: flex;
    flex-direction: column;
}

.panel-topbar {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 20px 28px;
}

.panel-topbar h1 {
    margin: 0;
    font-size: 24px;
}

.panel-topbar p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 14px;
}

.panel-content {
    padding: 24px 28px;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

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

    .sidebar {
        gap: 16px;
    }

    .sidebar-nav {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.profile-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.profile-tabs a {
    text-decoration: none;
    color: var(--muted);
    padding: 10px 16px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--surface);
    font-weight: 500;
    font-size: 14px;
}

.profile-tabs a.active,
.profile-tabs a:hover {
    color: var(--primary-dark);
    border-color: var(--primary);
    background: rgba(42, 185, 217, 0.08);
}

.profile-section {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px;
    box-shadow: var(--shadow);
}

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

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
    font: inherit;
    resize: vertical;
}

.form input:disabled {
    background: #f3f4f6;
    color: var(--muted);
}

.readonly-info {
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 14px;
    font-size: 14px;
}

.readonly-info p {
    margin: 0 0 6px;
}

.readonly-info p:last-child {
    margin-bottom: 0;
}

@media (max-width: 700px) {
    .form-row {
        grid-template-columns: 1fr;
    }

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

.wizard-steps {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.wizard-step {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: 14px;
}

.wizard-step.active {
    color: var(--primary-dark);
    font-weight: 600;
}

.wizard-step.done {
    color: var(--ok);
}

.wizard-step-num {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid var(--border);
    display: grid;
    place-items: center;
    font-size: 13px;
    font-weight: 600;
}

.wizard-step.active .wizard-step-num {
    border-color: var(--primary);
    background: var(--primary);
    color: #fff;
}

.wizard-step.done .wizard-step-num {
    border-color: var(--ok);
    background: var(--ok);
    color: #fff;
}

.wizard-step-line {
    width: 24px;
    height: 2px;
    background: var(--border);
}

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

.button-sm {
    padding: 8px 14px;
    font-size: 13px;
    margin-top: 0;
}

.box-dimensions {
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 16px;
    margin: 0;
}

.box-dimensions legend {
    font-weight: 600;
    padding: 0 6px;
}

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

.shipment-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 20px;
    align-items: center;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 20px;
}

.summary-item {
    font-size: 14px;
}

.carrier-table-wrap {
    overflow-x: auto;
    margin: 16px 0;
}

.carrier-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.carrier-table th,
.carrier-table td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--border);
    text-align: left;
}

.carrier-table th {
    background: #f8fafc;
    font-weight: 600;
}

.carrier-table .price {
    font-weight: 700;
    color: var(--primary-dark);
    white-space: nowrap;
}

.carrier-select input {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
}

/* Gönderilerim */
.shipments-page {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.shipments-toolbar {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.status-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 0;
}

.status-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 14px;
    font-size: 14px;
    color: var(--muted);
    text-decoration: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
}

.status-tab:hover {
    color: var(--primary-dark);
}

.status-tab.active {
    color: var(--primary-dark);
    font-weight: 600;
    border-bottom-color: var(--primary);
}

.status-tab-count {
    background: #eef2ff;
    color: var(--primary-dark);
    font-size: 12px;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 999px;
}

.shipments-table-wrap {
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fff;
}

.shipments-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    min-width: 960px;
}

.shipments-table th,
.shipments-table td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--border);
    text-align: left;
    vertical-align: middle;
}

.shipments-table th {
    background: #f8fafc;
    font-weight: 600;
    white-space: nowrap;
}

.shipments-table tbody tr:hover {
    background: #fafbff;
}

.shipments-table .mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 13px;
}

.shipments-table .price {
    font-weight: 700;
    color: var(--primary-dark);
    white-space: nowrap;
}

.actions-cell {
    text-align: right;
    white-space: nowrap;
}

.status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.status-pending {
    background: #e0f2fe;
    color: #0369a1;
}

.status-accepted {
    background: #fef3c7;
    color: #b45309;
}

.status-transit {
    background: #ede9fe;
    color: #6d28d9;
}

.status-delivered {
    background: #dcfce7;
    color: #15803d;
}

.status-cancelled {
    background: #fee2e2;
    color: #b91c1c;
}

.status-returned {
    background: #fce7f3;
    color: #be185d;
}

.empty-state {
    padding: 48px 24px;
    text-align: center;
    color: var(--muted);
}

.empty-state .button {
    margin-top: 12px;
}

/* Blur modal (OTO tarzı) */
body.modal-open {
    overflow: hidden;
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.modal-panel {
    width: min(920px, 100%);
    max-height: calc(100vh - 48px);
    overflow: auto;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 24px 48px rgba(15, 23, 42, 0.2);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
}

.modal-header h2 {
    margin: 0;
    font-size: 18px;
}

.modal-close {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    color: var(--muted);
    text-decoration: none;
    font-size: 24px;
    line-height: 1;
}

.modal-close:hover {
    background: #f1f5f9;
    color: var(--text);
}

.modal-tabs {
    display: flex;
    gap: 4px;
    padding: 0 24px;
    border-bottom: 1px solid var(--border);
    overflow-x: auto;
}

.modal-tab {
    padding: 12px 14px;
    font-size: 14px;
    color: var(--muted);
    text-decoration: none;
    border-bottom: 2px solid transparent;
    white-space: nowrap;
}

.modal-tab.active {
    color: var(--primary-dark);
    font-weight: 600;
    border-bottom-color: var(--primary);
}

.modal-body {
    padding: 24px;
}

.detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.detail-block h3 {
    margin: 0 0 12px;
    font-size: 15px;
}

.detail-block p {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 8px;
    margin: 0 0 10px;
    font-size: 14px;
}

.detail-block p span {
    color: var(--muted);
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 24px;
    border-top: 1px solid var(--border);
}

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

    .detail-block p {
        grid-template-columns: 1fr;
        gap: 2px;
    }

    .modal-backdrop {
        padding: 12px;
        align-items: flex-end;
    }

    .modal-panel {
        max-height: 92vh;
        border-bottom-left-radius: 0;
        border-bottom-right-radius: 0;
    }
}

.movements-table-wrap {
    overflow-x: auto;
}

.movements-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    min-width: 720px;
}

.movements-table th,
.movements-table td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--border);
    text-align: left;
    vertical-align: top;
}

.movements-table th {
    background: #f8fafc;
    font-weight: 600;
    white-space: nowrap;
}

.movement-by {
    color: var(--muted);
    font-size: 13px;
}

/* Admin panel */
.admin-sidebar {
    background: #111827;
}

.admin-mark {
    background: #f59e0b;
}

.sidebar-brand small {
    display: block;
    color: rgba(255, 255, 255, 0.55);
    font-size: 12px;
    font-weight: 400;
}

.sidebar-link-muted,
.sidebar-admin-link {
    color: rgba(255, 255, 255, 0.75) !important;
}

.sidebar-admin-link {
    border: 1px solid rgba(245, 158, 11, 0.45);
    border-radius: 8px;
    margin-top: 8px;
}

.stat-number {
    font-size: 32px;
    font-weight: 700;
    color: var(--primary-dark);
    margin: 8px 0;
}

.text-link {
    color: var(--primary-dark);
    font-weight: 600;
    text-decoration: none;
}

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

.admin-users-page {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.admin-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.inline-form {
    display: inline;
    margin: 0;
}

.search-form {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.search-form input[type="search"] {
    min-width: 220px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font: inherit;
}

.customers-page {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.address-cell {
    max-width: 240px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pricing-page {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.pricing-table-wrap {
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fff;
}

.pricing-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    min-width: 720px;
}

.pricing-table th,
.pricing-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
    text-align: center;
    white-space: nowrap;
}

.pricing-table th {
    background: #f8fafc;
    font-weight: 600;
}

.pricing-table th:first-child,
.pricing-table .desi-col {
    text-align: left;
    font-weight: 600;
    background: #fafbff;
    position: sticky;
    left: 0;
    z-index: 1;
}

.pricing-notes {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px 24px;
}

.pricing-notes h2 {
    margin: 0 0 12px;
    font-size: 16px;
}

.pricing-notes ul {
    margin: 0;
    padding-left: 20px;
    color: var(--muted);
    line-height: 1.7;
}

.balance-page {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.balance-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
}

.balance-card .stat-number {
    color: var(--primary-dark);
}

.bank-card p {
    display: grid;
    grid-template-columns: 80px 1fr;
    gap: 8px;
    margin: 0 0 8px;
    font-size: 14px;
}

.bank-card p span {
    color: var(--muted);
}

.balance-hint {
    display: block !important;
    grid-template-columns: 1fr !important;
    margin-top: 12px !important;
    font-size: 13px !important;
    color: var(--muted) !important;
}

.balance-history h2 {
    margin: 0 0 12px;
    font-size: 18px;
}

.mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 13px;
}

.button-danger {
    background: #fee2e2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.button-danger:hover {
    background: #fecaca;
}

@media print {
    .sidebar,
    .panel-topbar,
    .shipments-page,
    .modal-footer,
    .modal-tabs,
    .modal-close {
        display: none !important;
    }

    .modal-backdrop {
        position: static;
        background: none;
        backdrop-filter: none;
        padding: 0;
    }

    .modal-panel {
        box-shadow: none;
        max-height: none;
    }
}

.app-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.auth-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.auth-shell .auth-page {
    flex: 1;
}

.brand-logo {
    width: 48px;
    height: 48px;
    object-fit: contain;
    border-radius: 8px;
    flex-shrink: 0;
}

.powered-footer {
    width: 100%;
    text-align: center;
    padding: 20px 16px;
    margin-top: auto;
    color: var(--muted);
    font-size: 13px;
    background: var(--surface);
    border-top: 1px solid var(--border);
}

.powered-footer-copy {
    margin: 0 0 6px;
}

.powered-footer-credit {
    margin: 0;
}

.powered-footer-credit a {
    color: var(--muted);
    text-decoration: underline;
}

.no-select {
    user-select: none;
    -webkit-user-select: none;
}

.panel-body .app-shell .panel-layout {
    flex: 1;
}