/* PATETAS - PREMIUM BLACK & ORANGE EDITION */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Plus+Jakarta+Sans:wght@700;800&display=swap');

:root {
    --primary: #f58220;
    --primary-hover: #e06d0f;
    --dark: #0f172a;
    --darker: #020617;
    --light: #f8fafc;
    --white: #ffffff;
    --gray: #94a3b8;
    --border: #1e293b;
    --sidebar-width: 260px;
    --danger: #ef4444;
    --success: #10b981;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body { 
    font-family: 'Inter', sans-serif; 
    background-color: var(--darker); 
    color: var(--light); 
    min-height: 100vh;
}

/* Login Page */
.login-body {
    background-color: var(--darker);
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100vh;
    padding: 20px;
}

.login-card {
    background: var(--dark);
    padding: 40px;
    border-radius: 24px;
    border: 1px solid var(--border);
    width: 100%;
    max-width: 400px;
    text-align: center;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.5);
}

.login-card img { max-width: 180px; margin-bottom: 30px; }
.login-card h2 { margin-bottom: 25px; font-family: 'Plus Jakarta Sans'; color: white; }

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background-color: var(--dark);
    height: 100vh;
    position: fixed;
    left: 0; top: 0;
    padding: 30px 20px;
    border-right: 1px solid var(--border);
    z-index: 1000;
}

.sidebar .logo { margin-bottom: 40px; text-align: center; }
.sidebar .logo img { max-width: 140px; height: auto; }

.sidebar nav a {
    display: block;
    padding: 12px 15px;
    color: var(--gray);
    text-decoration: none;
    border-radius: 12px;
    margin-bottom: 8px;
    font-weight: 500;
    transition: all 0.2s;
}

.sidebar nav a:hover, .sidebar nav a.active { background: var(--primary); color: white; }

/* Main Content */
.main-content {
    margin-left: var(--sidebar-width);
    padding: 30px;
    width: calc(100% - var(--sidebar-width));
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--dark);
    padding: 15px 25px;
    border-radius: 15px;
    margin-bottom: 30px;
    border: 1px solid var(--border);
}

.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    background: var(--dark);
    padding: 20px 25px;
    border-radius: 15px;
    border: 1px solid var(--border);
}

/* Dashboard Premium Cards */
.dashboard-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.card {
    background: linear-gradient(145deg, var(--dark), #1e293b);
    padding: 25px;
    border-radius: 24px;
    border: 1px solid var(--border);
    position: relative;
    overflow: hidden;
}

.card h3 { font-size: 0.85rem; color: var(--gray); text-transform: uppercase; margin-bottom: 12px; letter-spacing: 1px; }
.card p { font-size: 1.8rem; font-weight: 800; color: white; font-family: 'Plus Jakarta Sans'; }

/* Forms & Inputs */
.form-group { margin-bottom: 20px; text-align: left; }
.form-group label { display: block; margin-bottom: 8px; color: var(--gray); font-size: 0.9rem; }
.form-control {
    width: 100%;
    padding: 14px 18px;
    background: var(--darker);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: white;
    font-size: 1rem;
}
.form-control:focus { outline: none; border-color: var(--primary); }

/* Buttons */
.btn {
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    text-decoration: none;
}

.btn-primary { background: var(--primary); color: white; box-shadow: 0 4px 14px 0 rgba(245, 130, 32, 0.3); }
.btn-primary:hover { background: var(--primary-hover); transform: translateY(-2px); }
.btn-secondary { background: var(--border); color: white; }
.btn-sm { padding: 8px 15px; font-size: 0.8rem; }

/* Table */
.table-responsive {
    background: var(--dark);
    border-radius: 20px;
    border: 1px solid var(--border);
    overflow-x: auto;
}

.table { width: 100%; border-collapse: collapse; min-width: 600px; }
.table th { text-align: left; padding: 18px; color: var(--gray); font-size: 0.8rem; border-bottom: 1px solid var(--border); }
.table td { padding: 18px; border-bottom: 1px solid var(--border); color: white; }

/* Modais Centralizados e Responsivos */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0; top: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.85);
    padding: 20px;
    overflow-y: auto;
}

.modal-content {
    background: var(--dark);
    width: 95%;
    max-width: 800px;
    margin: 40px auto;
    padding: 35px;
    border-radius: 24px;
    border: 1px solid var(--border);
    color: white;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.8);
}

.modal-content h3 {
    margin-bottom: 25px;
    font-family: 'Plus Jakarta Sans';
    color: var(--primary);
    border-bottom: 1px solid var(--border);
    padding-bottom: 15px;
}

/* Grid dentro de Modais */
.modal-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

/* MOBILE RESPONSIVENESS */
@media (max-width: 1024px) {
    .sidebar { width: 80px; padding: 20px 10px; }
    .sidebar .logo img { max-width: 50px; }
    .sidebar nav a span { display: none; }
    .main-content { margin-left: 80px; width: calc(100% - 80px); }
}

@media (max-width: 768px) {
    body { display: block; }
    .sidebar { 
        position: relative; 
        width: 100%; 
        height: auto; 
        padding: 15px; 
        border-right: none; 
        border-bottom: 1px solid var(--border);
    }
    .sidebar nav { display: flex; overflow-x: auto; gap: 10px; padding-bottom: 10px; }
    .sidebar nav a { margin-bottom: 0; white-space: nowrap; padding: 8px 15px; font-size: 0.8rem; }
    .sidebar .logo { margin-bottom: 15px; }
    
    .main-content { 
        margin-left: 0; 
        width: 100%; 
        padding: 20px; 
    }
    
    .content-header { flex-direction: column; align-items: stretch; gap: 15px; text-align: center; }
    .modal-row { grid-template-columns: 1fr; }
    .btn { width: 100%; }
}
