/* ========================================
   ADMIN STYLES
   ======================================== */
.admin-body {
    background: #0a0a0a;
}

/* LOGIN */
.admin-login {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.login-card {
    background: #161616;
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 16px;
    padding: 48px;
    width: 100%;
    max-width: 400px;
    text-align: center;
}

.login-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 32px;
}

.login-logo i {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #00d4aa, #00b4d8);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: #000;
}

.login-card h2 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 8px;
}

.login-card p {
    color: #666;
    font-size: 14px;
    margin-bottom: 32px;
}

.input-group {
    position: relative;
    margin-bottom: 16px;
}

.input-group i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
    font-size: 16px;
}

.input-group input {
    width: 100%;
    padding: 14px 16px 14px 48px;
    background: #1e1e1e;
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 10px;
    color: #fff;
    font-size: 15px;
    font-family: 'Inter', sans-serif;
    transition: all 0.3s;
}

.input-group input:focus {
    border-color: #00d4aa;
    outline: none;
}

.login-error {
    color: #ef4444;
    font-size: 13px;
    margin-top: 12px;
    display: none;
}

/* ADMIN LAYOUT */
.admin-panel {
    display: flex;
    min-height: 100vh;
}

/* SIDEBAR */
.admin-sidebar {
    width: 260px;
    background: #111111;
    border-right: 1px solid rgba(255,255,255,0.06);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 100;
}

.sidebar-header {
    padding: 20px 24px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.sidebar-nav {
    flex: 1;
    padding: 16px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: #a0a0a0;
    text-decoration: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
}

.sidebar-link:hover {
    background: rgba(255,255,255,0.05);
    color: #fff;
}

.sidebar-link.active {
    background: rgba(0, 212, 170, 0.1);
    color: #00d4aa;
}

.sidebar-link i {
    width: 20px;
    text-align: center;
}

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid rgba(255,255,255,0.06);
}

.btn-logout {
    width: 100%;
    padding: 12px;
    background: rgba(239, 68, 68, 0.1);
    border: none;
    border-radius: 10px;
    color: #ef4444;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s;
    font-family: 'Inter', sans-serif;
}

.btn-logout:hover {
    background: rgba(239, 68, 68, 0.2);
}

/* MAIN */
.admin-main {
    flex: 1;
    margin-left: 260px;
    min-height: 100vh;
}

.admin-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 32px;
    background: rgba(10, 10, 10, 0.9);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255,255,255,0.06);
    position: sticky;
    top: 0;
    z-index: 50;
}

.admin-header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.admin-header h1 {
    font-size: 22px;
    font-weight: 700;
}

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
}

.gateway-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(0, 212, 170, 0.1);
    border-radius: 50px;
    font-size: 13px;
    font-weight: 600;
    color: #00d4aa;
}

.gateway-badge i {
    font-size: 8px;
}

/* SECTIONS */
.admin-section {
    display: none;
    padding: 32px;
}

.admin-section.active {
    display: block;
}

/* STATS */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.stat-card {
    background: #161616;
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 14px;
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.stat-icon {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

.stat-value {
    font-size: 28px;
    font-weight: 800;
    display: block;
}

.stat-label {
    font-size: 13px;
    color: #666;
}

/* ORDERS TABLE */
.recent-orders, .orders-table {
    background: #161616;
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 14px;
    padding: 24px;
}

.recent-orders h3 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 20px;
}

.section-header-admin {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.section-header-admin h2 {
    font-size: 22px;
    font-weight: 700;
}

.filter-group select {
    padding: 10px 16px;
    background: #1e1e1e;
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 8px;
    color: #fff;
    font-size: 13px;
    font-family: 'Inter', sans-serif;
}

.order-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    cursor: pointer;
    transition: all 0.2s;
}

.order-row:hover {
    background: rgba(255,255,255,0.02);
    margin: 0 -24px;
    padding: 16px 24px;
}

.order-row:last-child {
    border-bottom: none;
}

.order-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.order-id {
    font-weight: 700;
    font-size: 14px;
}

.order-customer {
    font-size: 13px;
    color: #666;
}

.order-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.order-total {
    font-weight: 700;
    color: #00d4aa;
}

.order-status {
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 600;
}

.order-status.pendente {
    background: rgba(234, 179, 8, 0.1);
    color: #eab308;
}

.order-status.pago {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
}

.order-status.em_analise {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
}

.order-date {
    font-size: 12px;
    color: #666;
}

.empty-state {
    text-align: center;
    color: #666;
    padding: 40px;
}

/* GATEWAY CONFIG */
.gateway-config {
    max-width: 900px;
}

.gateway-config h2 {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 8px;
}

.gateway-desc {
    color: #666;
    margin-bottom: 32px;
}

.gateway-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 24px;
}

.gateway-card {
    background: #161616;
    border: 2px solid rgba(255,255,255,0.06);
    border-radius: 16px;
    padding: 28px;
    cursor: pointer;
    transition: all 0.3s;
}

.gateway-card:hover {
    border-color: rgba(255,255,255,0.12);
}

.gateway-card.active {
    border-color: #00d4aa;
    box-shadow: 0 0 30px rgba(0, 212, 170, 0.1);
}

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

.gateway-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

.gateway-icon.medusa {
    background: rgba(0, 180, 216, 0.1);
    color: #00b4d8;
}

.gateway-icon.egito {
    background: rgba(234, 179, 8, 0.1);
    color: #eab308;
}

.gateway-status {
    font-size: 12px;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 50px;
}

.gateway-card.active .gateway-status {
    background: rgba(0, 212, 170, 0.1);
    color: #00d4aa;
}

.gateway-card:not(.active) .gateway-status {
    background: rgba(255,255,255,0.05);
    color: #666;
}

.gateway-card h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
}

.gateway-card p {
    color: #666;
    font-size: 13px;
    margin-bottom: 16px;
}

.gateway-features {
    list-style: none;
}

.gateway-features li {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #a0a0a0;
    padding: 4px 0;
}

.gateway-features i {
    color: #00d4aa;
    font-size: 12px;
}

.gateway-current {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 20px;
    background: rgba(0, 212, 170, 0.05);
    border: 1px solid rgba(0, 212, 170, 0.2);
    border-radius: 10px;
    font-size: 14px;
    color: #a0a0a0;
}

.gateway-current i {
    color: #00d4aa;
}

.gateway-current strong {
    color: #00d4aa;
}

/* SETTINGS */
.settings-card {
    max-width: 500px;
    background: #161616;
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 16px;
    padding: 32px;
}

.settings-card h2 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 24px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #a0a0a0;
    margin-bottom: 8px;
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    background: #1e1e1e;
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 8px;
    color: #fff;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
}

.form-group input:focus {
    border-color: #00d4aa;
    outline: none;
}

/* NEW ORDER FORM */
.new-order-form {
    max-width: 700px;
    background: #161616;
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 16px;
    padding: 32px;
}

.new-order-form h2 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 8px;
}

.new-order-item {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 10px;
}

.new-item-select {
    flex: 2;
    padding: 10px 12px;
    background: #1e1e1e;
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 8px;
    color: #fff;
    font-size: 13px;
    font-family: 'Inter', sans-serif;
}

.new-item-qty {
    width: 60px;
    padding: 10px;
    background: #1e1e1e;
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 8px;
    color: #fff;
    font-size: 13px;
    text-align: center;
    font-family: 'Inter', sans-serif;
}

.new-item-price {
    width: 100px;
    padding: 10px;
    background: #1e1e1e;
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 8px;
    color: #fff;
    font-size: 13px;
    font-family: 'Inter', sans-serif;
}

.new-order-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    margin-top: 16px;
    border-top: 2px solid rgba(255,255,255,0.06);
    font-size: 20px;
    font-weight: 700;
}

.new-order-total span:last-child {
    color: #00d4aa;
}

/* ORDER MODAL */
.order-modal {
    max-width: 600px;
}

.order-detail h3 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 20px;
}

.order-detail-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    font-size: 14px;
}

.order-detail-row span:first-child {
    color: #666;
}

.order-detail-items {
    margin: 20px 0;
}

.order-detail-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    font-size: 14px;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .admin-sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s;
    }

    .admin-sidebar.active {
        transform: translateX(0);
    }

    .admin-main {
        margin-left: 0;
    }

    .mobile-toggle {
        display: block;
    }

    .gateway-options {
        grid-template-columns: 1fr;
    }

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