* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: #f5f7fb;
    color: #1f2937;
}


/* LOGIN */

.login-page {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.login-card {
    width: 100%;
    max-width: 420px;
    background: #ffffff;
    padding: 40px;
    border-radius: 18px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, .08);
}

.login-card h1 {
    margin-top: 0;
    margin-bottom: 8px;
}

.login-subtitle {
    margin-top: 0;
    margin-bottom: 30px;
    color: #6b7280;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

.form-group input {
    width: 100%;
    padding: 13px 14px;
    border: 1px solid #d1d5db;
    border-radius: 9px;
    font-size: 16px;
}

.btn-primary {
    width: 100%;
    border: 0;
    padding: 14px;
    border-radius: 9px;
    background: #111827;
    color: white;
    font-size: 16px;
    cursor: pointer;
}

.alert-error {
    padding: 12px;
    margin-bottom: 20px;
    background: #fee2e2;
    border-radius: 8px;
    color: #991b1b;
}


/* APP */

.app-layout {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 250px;
    background: #111827;
    color: white;
    padding: 30px 20px;
}

.logo {
    font-weight: 700;
    font-size: 20px;
    margin-bottom: 40px;
}

.sidebar nav a {
    display: block;
    padding: 13px 15px;
    margin-bottom: 5px;
    text-decoration: none;
    color: #d1d5db;
    border-radius: 8px;
}

.sidebar nav a:hover,
.sidebar nav a.active {
    background: #1f2937;
    color: white;
}

.main-content {
    flex: 1;
    padding: 40px;
}

.page-header {
    margin-bottom: 35px;
}

.page-header h1 {
    margin-bottom: 5px;
}

.page-header p {
    margin-top: 0;
    color: #6b7280;
}

.stats-grid {
    display: grid;
    grid-template-columns:
        repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.stat-card {
    background: white;
    padding: 25px;
    border-radius: 14px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, .04);
}

.stat-card span {
    display: block;
    color: #6b7280;
    margin-bottom: 12px;
}

.stat-card strong {
    font-size: 32px;
}

/* PAGE HEADER */

.page-header-flex {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}


/* BUTTONS */

.btn-action,
.btn-save {
    display: inline-block;
    padding: 12px 18px;
    border: 0;
    border-radius: 9px;
    background: #111827;
    color: #ffffff;
    text-decoration: none;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
}

.btn-secondary {
    display: inline-block;
    padding: 12px 18px;
    border-radius: 9px;
    background: #e5e7eb;
    color: #111827;
    text-decoration: none;
    font-weight: 600;
}


/* CARDS */

.table-card,
.form-card {
    background: #ffffff;
    border-radius: 14px;
    padding: 25px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, .04);
}


/* TABLE */

.table-responsive {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th {
    text-align: left;
    padding: 14px;
    border-bottom: 1px solid #e5e7eb;
    color: #6b7280;
    font-size: 13px;
    text-transform: uppercase;
}

.data-table td {
    padding: 16px 14px;
    border-bottom: 1px solid #f1f5f9;
}

.data-table tr:last-child td {
    border-bottom: 0;
}


/* STATUS */

.status {
    display: inline-block;
    padding: 6px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
}

.status-pending {
    background: #fef3c7;
    color: #92400e;
}

.status-synced {
    background: #dcfce7;
    color: #166534;
}

.status-error {
    background: #fee2e2;
    color: #991b1b;
}


/* SUCCESS */

.alert-success {
    padding: 14px 16px;
    margin-bottom: 20px;
    border-radius: 9px;
    background: #dcfce7;
    color: #166534;
}


/* CUSTOMER FORM */

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.full-width {
    grid-column: 1 / -1;
}

.form-card .form-group {
    margin: 0;
}

.form-card input {
    width: 100%;
    padding: 13px 14px;
    border: 1px solid #d1d5db;
    border-radius: 9px;
    font-size: 15px;
    background: #ffffff;
}

.form-card input:focus {
    outline: none;
    border-color: #6b7280;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
}


/* EMPTY */

.empty-state {
    padding: 50px 20px;
    text-align: center;
}

.empty-state h3 {
    margin-top: 0;
}

.empty-state p {
    color: #6b7280;
    margin-bottom: 25px;
}


/* MOBILE */

@media (max-width: 800px) {

    .sidebar {
        width: 200px;
    }

    .main-content {
        padding: 25px;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .full-width {
        grid-column: auto;
    }

    .page-header-flex {
        align-items: flex-start;
        flex-direction: column;
    }
}
/* PEGASUS SYNC */

.btn-sync {
    border: 0;
    border-radius: 8px;
    padding: 9px 13px;
    background: #111827;
    color: #ffffff;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
}

.btn-sync:hover {
    opacity: .88;
}

.sync-form {
    margin: 0;
}

.sync-complete {
    color: #166534;
    font-size: 13px;
    font-weight: 600;
}

.status-syncing {
    background: #dbeafe;
    color: #1e40af;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.header-actions form {
    margin: 0;
}

.btn-import {
    border: 1px solid #d1d5db;
    border-radius: 9px;
    padding: 11px 16px;
    background: #ffffff;
    color: #111827;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.btn-import:hover {
    background: #f3f4f6;
}