/* Gastfood Master Panel — design system
 * Gastfood orange brand + modern dashboard look. iOS-inspired tokens.
 */

:root {
    --gf-orange: #f8a622;
    --gf-orange-2: #ff8c00;
    --gf-orange-soft: #fff4e0;
    --gf-text: #1c1c1e;
    --gf-text-secondary: #6b7280;
    --gf-text-muted: #9ca3af;
    --gf-bg: #f5f6fa;
    --gf-bg-2: #ffffff;
    --gf-card: #ffffff;
    --gf-hairline: #e5e7eb;
    --gf-sidebar-bg: #1c1c1e;
    --gf-sidebar-hover: #2c2c2e;
    --gf-sidebar-active: linear-gradient(135deg, #f8a622, #ff8c00);

    --gf-success: #10b981;
    --gf-warning: #f59e0b;
    --gf-danger: #ef4444;
    --gf-info: #3b82f6;

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 18px;
}

* { box-sizing: border-box; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--gf-bg);
    color: var(--gf-text);
    margin: 0;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--gf-orange-2); text-decoration: none; }
a:hover { color: var(--gf-orange); }

/* ============== SHELL ============== */
.mp-shell { display: flex; min-height: 100vh; }
.mp-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

/* ============== SIDEBAR ============== */
.mp-sidebar {
    width: 260px;
    background: var(--gf-sidebar-bg);
    color: #e5e7eb;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    transition: transform 0.25s;
    z-index: 100;
}
.mp-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 18px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.mp-brand-logo {
    width: 38px; height: 38px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--gf-orange), var(--gf-orange-2));
    display: flex; align-items: center; justify-content: center;
    color: white; font-weight: 800; font-size: 18px;
    box-shadow: 0 8px 16px rgba(248,166,34,0.3);
}
.mp-brand-title { font-weight: 700; font-size: 15px; color: white; line-height: 1.2; }
.mp-brand-sub { font-size: 10px; color: #9ca3af; letter-spacing: 0.1em; text-transform: uppercase; margin-top: 2px; }

.mp-nav {
    flex: 1;
    padding: 14px 12px;
    overflow-y: auto;
}
.mp-nav-group {
    font-size: 10px;
    letter-spacing: 0.12em;
    color: #6b7280;
    padding: 16px 12px 8px;
    font-weight: 700;
}
.mp-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    color: #d1d5db;
    border-radius: 10px;
    margin-bottom: 2px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.15s;
}
.mp-link i { font-size: 17px; width: 20px; text-align: center; }
.mp-link:hover { background: var(--gf-sidebar-hover); color: white; }
.mp-link.active {
    background: var(--gf-sidebar-active);
    color: white;
    font-weight: 600;
    box-shadow: 0 6px 14px rgba(248,166,34,0.3);
}

.mp-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    border-top: 1px solid rgba(255,255,255,0.06);
}
.mp-user-avatar {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gf-orange), var(--gf-orange-2));
    display: flex; align-items: center; justify-content: center;
    color: white; font-weight: 700; font-size: 14px;
}
.mp-user-info { flex: 1; min-width: 0; }
.mp-user-name { font-size: 13px; font-weight: 600; color: white; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mp-user-role { font-size: 11px; color: #9ca3af; }
.mp-logout {
    color: #9ca3af;
    width: 32px; height: 32px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 8px;
    font-size: 16px;
}
.mp-logout:hover { background: rgba(239,68,68,0.15); color: #fca5a5; }

/* ============== TOPBAR ============== */
.mp-topbar {
    background: var(--gf-bg-2);
    border-bottom: 1px solid var(--gf-hairline);
    padding: 16px 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    position: sticky;
    top: 0;
    z-index: 10;
}
.mp-page-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--gf-text);
    margin: 0;
    letter-spacing: -0.01em;
    flex: 1;
}
.mp-sidebar-toggle {
    background: none;
    border: none;
    font-size: 22px;
    color: var(--gf-text);
    padding: 4px 8px;
    cursor: pointer;
}

.mp-content {
    flex: 1;
    padding: 24px;
}

/* ============== CARDS ============== */
.mp-card {
    background: var(--gf-card);
    border: 1px solid var(--gf-hairline);
    border-radius: var(--radius-md);
    padding: 18px;
}
.mp-card.lift {
    transition: all 0.2s;
}
.mp-card.lift:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(0,0,0,0.06);
}
.mp-card-title {
    font-size: 14px;
    font-weight: 700;
    margin: 0 0 14px;
    color: var(--gf-text);
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ============== KPI ============== */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}
.kpi {
    background: var(--gf-card);
    border: 1px solid var(--gf-hairline);
    border-radius: var(--radius-md);
    padding: 20px;
    position: relative;
    overflow: hidden;
}
.kpi::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; height: 3px;
    background: var(--accent, var(--gf-orange));
}
.kpi.success::before { background: var(--gf-success); }
.kpi.warning::before { background: var(--gf-warning); }
.kpi.danger::before { background: var(--gf-danger); }
.kpi.info::before { background: var(--gf-info); }

.kpi-label {
    font-size: 11px;
    color: var(--gf-text-muted);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    font-weight: 700;
    margin-bottom: 6px;
}
.kpi-value {
    font-size: 28px;
    font-weight: 800;
    color: var(--gf-text);
    line-height: 1.1;
    letter-spacing: -0.02em;
}
.kpi-sub {
    font-size: 12px;
    color: var(--gf-text-secondary);
    margin-top: 6px;
}
.kpi-icon {
    position: absolute;
    top: 16px; right: 16px;
    font-size: 28px;
    opacity: 0.2;
}

/* ============== TABLE ============== */
.mp-table-card {
    background: var(--gf-card);
    border: 1px solid var(--gf-hairline);
    border-radius: var(--radius-md);
    overflow: hidden;
}
.mp-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.5px;
}
.mp-table thead {
    background: #f9fafb;
}
.mp-table th {
    text-align: left;
    padding: 12px 16px;
    font-size: 11px;
    font-weight: 700;
    color: var(--gf-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border-bottom: 1px solid var(--gf-hairline);
    white-space: nowrap;
}
.mp-table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--gf-hairline);
    vertical-align: middle;
}
.mp-table tr:last-child td { border-bottom: none; }
.mp-table tr:hover { background: #f9fafb; }
.mp-table .col-name {
    font-weight: 600;
    color: var(--gf-text);
}
.mp-table .col-muted {
    color: var(--gf-text-muted);
    font-size: 12px;
}

/* Avatar */
.mp-avatar {
    width: 36px; height: 36px;
    border-radius: 50%;
    object-fit: cover;
    background: linear-gradient(135deg, #ffd896, #ffb04a);
    display: inline-flex; align-items: center; justify-content: center;
    color: white; font-weight: 700;
    flex-shrink: 0;
}
.mp-avatar.placeholder {
    background: linear-gradient(135deg, #f8a622, #ff8c00);
    font-size: 13px;
}

/* ============== BADGE ============== */
.badge { padding: 4px 10px; font-size: 11px; font-weight: 700; border-radius: 999px; letter-spacing: 0.02em; }
.badge.bg-success { background: #d1fae5; color: #065f46; }
.badge.bg-warning { background: #fef3c7; color: #92400e; }
.badge.bg-danger  { background: #fee2e2; color: #991b1b; }
.badge.bg-info    { background: #dbeafe; color: #1e3a8a; }
.badge.bg-secondary { background: #f3f4f6; color: #4b5563; }

/* ============== BUTTONS ============== */
.btn-gf {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 16px;
    background: linear-gradient(135deg, var(--gf-orange), var(--gf-orange-2));
    color: white !important;
    border: none;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
    text-decoration: none;
}
.btn-gf:hover { transform: translateY(-1px); box-shadow: 0 8px 18px rgba(248,166,34,0.35); color: white; }
.btn-gf:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.btn-ghost {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 14px;
    background: white;
    color: var(--gf-text);
    border: 1px solid var(--gf-hairline);
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
    text-decoration: none;
}
.btn-ghost:hover { background: #f9fafb; color: var(--gf-text); }

.btn-danger-soft {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 14px;
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
}
.btn-danger-soft:hover { background: #fecaca; color: #991b1b; }

/* ============== FORMS ============== */
.form-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--gf-text-secondary);
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.form-control, .form-select {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid var(--gf-hairline);
    border-radius: 10px;
    font-size: 14px;
    background: white;
    color: var(--gf-text);
    transition: border-color 0.15s, box-shadow 0.15s;
}
.form-control:focus, .form-select:focus {
    outline: none;
    border-color: var(--gf-orange);
    box-shadow: 0 0 0 3px rgba(248,166,34,0.15);
}

/* ============== LOGIN ============== */
.mp-login-shell {
    min-height: 100vh;
    background:
        radial-gradient(circle at top right, rgba(248,166,34,0.15), transparent 50%),
        radial-gradient(circle at bottom left, rgba(255,140,0,0.10), transparent 50%),
        #f5f6fa;
    display: flex; align-items: center; justify-content: center;
    padding: 24px;
}
.mp-login-card {
    background: white;
    border-radius: 20px;
    padding: 40px;
    max-width: 420px; width: 100%;
    box-shadow: 0 30px 60px rgba(0,0,0,0.08);
    border: 1px solid var(--gf-hairline);
}
.mp-login-logo {
    width: 60px; height: 60px;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--gf-orange), var(--gf-orange-2));
    display: flex; align-items: center; justify-content: center;
    color: white; font-weight: 800; font-size: 26px;
    margin-bottom: 20px;
    box-shadow: 0 14px 28px rgba(248,166,34,0.35);
}
.mp-login-title {
    font-size: 24px; font-weight: 800; color: var(--gf-text);
    margin-bottom: 4px; letter-spacing: -0.02em;
}
.mp-login-sub {
    font-size: 13px; color: var(--gf-text-secondary);
    margin-bottom: 28px;
}

/* ============== MOBILE ============== */
@media (max-width: 767.98px) {
    .mp-sidebar {
        position: fixed;
        transform: translateX(-100%);
        height: 100vh;
    }
    .mp-sidebar.mp-open { transform: translateX(0); }
    .mp-content { padding: 16px; }
}
