@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #0f766e;
    --primary-dark: #115e59;
    --secondary: #14b8a6;
    --dark: #0f172a;
    --text: #334155;
    --muted: #64748b;
    --background: #f8fafc;
    --white: #ffffff;
    --border: #e2e8f0;
    --success: #16a34a;
    --warning: #d97706;
    --danger: #dc2626;
    --shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--background);
    color: var(--text);
    min-height: 100vh;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select,
textarea {
    font-family: inherit;
}

/* ==============================
   CONTENEDOR
============================== */

.container {
    width: min(1200px, 92%);
    margin: auto;
}

/* ==============================
   TOPBAR
============================== */

.topbar {
    height: 74px;
    background: var(--white);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.topbar-inner {
    width: min(1200px, 92%);
    margin: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.logo {
    font-size: 21px;
    font-weight: 800;
    color: var(--dark);
}

.logo span {
    color: var(--primary);
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-name {
    font-weight: 600;
    color: var(--dark);
}

.btn {
    border: none;
    border-radius: 10px;
    padding: 11px 18px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 700;
    transition: .2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-secondary {
    background: #e2e8f0;
    color: var(--dark);
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-warning {
    background: var(--warning);
    color: white;
}

/* ==============================
   DASHBOARD
============================== */

.dashboard {
    padding: 40px 0;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
}

.dashboard-title h1 {
    font-size: 30px;
    color: var(--dark);
    margin-bottom: 8px;
}

.dashboard-title p {
    color: var(--muted);
}

/* ==============================
   CARDS
============================== */

.card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: var(--shadow);
}

.card-body {
    padding: 25px;
}

.card-title {
    font-size: 18px;
    font-weight: 800;
    color: var(--dark);
    margin-bottom: 8px;
}

.card-description {
    color: var(--muted);
    font-size: 14px;
}

/* ==============================
   STATS
============================== */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 22px;
    box-shadow: var(--shadow);
}

.stat-label {
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 10px;
}

.stat-number {
    font-size: 30px;
    font-weight: 800;
    color: var(--dark);
}

.stat-icon {
    font-size: 25px;
    margin-bottom: 12px;
}

/* ==============================
   GRID
============================== */

.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

/* ==============================
   ACCIONES
============================== */

.action-card {
    padding: 25px;
    background: white;
    border: 1px solid var(--border);
    border-radius: 18px;
    transition: .2s ease;
}

.action-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.action-icon {
    width: 50px;
    height: 50px;
    border-radius: 14px;
    background: #ccfbf1;
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 23px;
    margin-bottom: 15px;
}

.action-card h3 {
    color: var(--dark);
    margin-bottom: 8px;
}

.action-card p {
    color: var(--muted);
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 18px;
}

/* ==============================
   TABLAS
============================== */

.table-wrapper {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th {
    text-align: left;
    background: #f8fafc;
    color: var(--muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .4px;
    padding: 14px;
}

.table td {
    padding: 15px 14px;
    border-top: 1px solid var(--border);
    font-size: 14px;
}

.table td strong {
    color: var(--dark);
}

/* ==============================
   ESTADOS
============================== */

.status {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.status-new {
    background: #dbeafe;
    color: #1d4ed8;
}

.status-review {
    background: #fef3c7;
    color: #92400e;
}

.status-quote {
    background: #ede9fe;
    color: #6d28d9;
}

.status-accepted {
    background: #dcfce7;
    color: #166534;
}

.status-rejected {
    background: #fee2e2;
    color: #991b1b;
}

.status-scheduled {
    background: #ccfbf1;
    color: #115e59;
}

.status-process {
    background: #cffafe;
    color: #155e75;
}

.status-completed {
    background: #dcfce7;
    color: #166534;
}

/* ==============================
   BIENVENIDA
============================== */

.welcome-box {
    background: linear-gradient(
        135deg,
        #0f766e,
        #14b8a6
    );
    color: white;
    border-radius: 22px;
    padding: 35px;
    margin-bottom: 30px;
    box-shadow: 0 15px 40px rgba(15, 118, 110, .2);
}

.welcome-box h1 {
    font-size: 30px;
    margin-bottom: 10px;
}

.welcome-box p {
    opacity: .9;
}

/* ==============================
   ALERTAS
============================== */

.alert {
    padding: 15px 18px;
    border-radius: 12px;
    margin-bottom: 20px;
    font-size: 14px;
}

.alert-success {
    background: #dcfce7;
    color: #166534;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
}

.alert-info {
    background: #dbeafe;
    color: #1e40af;
}

/* ==============================
   ESTADO VACÍO
============================== */

.empty-state {
    text-align: center;
    padding: 45px 20px;
}

.empty-state-icon {
    font-size: 45px;
    margin-bottom: 15px;
}

.empty-state h3 {
    color: var(--dark);
    margin-bottom: 8px;
}

.empty-state p {
    color: var(--muted);
    margin-bottom: 20px;
}

/* ==============================
   RESPONSIVE
============================== */

@media (max-width: 900px) {

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .grid-3 {
        grid-template-columns: 1fr 1fr;
    }

}

@media (max-width: 700px) {

    .topbar {
        height: auto;
        padding: 15px 0;
    }

    .topbar-inner {
        flex-direction: column;
        align-items: flex-start;
    }

    .user-menu {
        width: 100%;
        justify-content: space-between;
    }

    .dashboard {
        padding: 25px 0;
    }

    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .stats-grid,
    .grid-2,
    .grid-3 {
        grid-template-columns: 1fr;
    }

    .welcome-box {
        padding: 25px;
    }

    .welcome-box h1 {
        font-size: 24px;
    }

}