/* ==========================================
   SISTEMA ACS - CSS GLOBAL v3.0
   Prefeitura Municipal de Quixaba - PE
   ========================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
    /* Cores Primarias */
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #3b82f6;
    --primary-50: #eff6ff;
    --primary-100: #dbeafe;
    --primary-200: #bfdbfe;

    /* Cores de Destaque */
    --accent: #6366f1;
    --accent-dark: #4f46e5;

    /* Status */
    --success: #10b981;
    --success-light: #34d399;
    --success-50: #ecfdf5;
    --warning: #f59e0b;
    --warning-50: #fffbeb;
    --danger: #ef4444;
    --danger-50: #fef2f2;

    /* Neutras */
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;

    /* Layout */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 20px;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -2px rgba(0,0,0,0.05);
    --shadow-lg: 0 10px 25px -5px rgba(0,0,0,0.08), 0 8px 10px -6px rgba(0,0,0,0.04);
    --shadow-xl: 0 20px 50px -12px rgba(0,0,0,0.12);
    --transition: all 0.2s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

body {
    background: var(--gray-100);
    color: var(--gray-800);
    min-height: 100vh;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* ==========================================
   HEADER GLOBAL
   ========================================== */
.g-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 70px;
    background: white;
    box-shadow: var(--shadow-sm);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    border-bottom: 1px solid var(--gray-200);
}

.g-header-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.g-header-logo img {
    height: 44px;
    width: auto;
}

.g-header-logo-text {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--gray-800);
    line-height: 1.3;
}

.g-header-logo-text span {
    color: var(--primary);
    display: block;
    font-size: 0.72rem;
}

.g-header-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.g-header-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: var(--radius-md);
    font-size: 0.82rem;
    font-weight: 500;
    text-decoration: none;
    transition: var(--transition);
    border: none;
    cursor: pointer;
}

.g-header-btn-outline {
    background: transparent;
    color: var(--gray-600);
    border: 1.5px solid var(--gray-200);
}

.g-header-btn-outline:hover {
    background: var(--gray-50);
    border-color: var(--gray-300);
    color: var(--gray-800);
}

.g-header-btn-primary {
    background: var(--primary);
    color: white;
}

.g-header-btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.g-header-btn-danger {
    background: transparent;
    color: var(--danger);
    border: 1.5px solid transparent;
}

.g-header-btn-danger:hover {
    background: var(--danger-50);
}

/* ==========================================
   FOOTER GLOBAL
   ========================================== */
.g-footer {
    background: var(--gray-900);
    color: var(--gray-400);
    padding: 48px 24px 24px;
    margin-top: 60px;
}

.g-footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 32px;
}

.g-footer-section h4 {
    color: white;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 16px;
}

.g-footer-section p,
.g-footer-section a {
    font-size: 0.82rem;
    line-height: 1.8;
    color: var(--gray-400);
    text-decoration: none;
}

.g-footer-section a:hover {
    color: white;
}

.g-footer-section ul {
    list-style: none;
    padding: 0;
}

.g-footer-section ul li a {
    display: block;
    padding: 2px 0;
}

.g-footer-bottom {
    max-width: 1200px;
    margin: 32px auto 0;
    padding-top: 20px;
    border-top: 1px solid var(--gray-700);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.g-footer-bottom p {
    font-size: 0.75rem;
    color: var(--gray-500);
}

/* ==========================================
   MAIN CONTAINER
   ========================================== */
.g-main {
    max-width: 1300px;
    margin: 0 auto;
    padding: 94px 24px 24px;
    min-height: calc(100vh - 200px);
}

.g-main-full {
    padding-top: 70px;
    min-height: 100vh;
}

/* ==========================================
   CARDS
   ========================================== */
.g-card {
    background: white;
    border-radius: var(--radius-lg);
    border: 1px solid var(--gray-200);
    padding: 24px;
    transition: var(--transition);
}

.g-card:hover {
    box-shadow: var(--shadow-lg);
}

.g-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--gray-100);
}

.g-card-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-800);
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ==========================================
   HERO SECTION
   ========================================== */
.g-hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 32px 36px;
    border-radius: var(--radius-xl);
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
}

.g-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 350px;
    height: 350px;
    background: rgba(255,255,255,0.08);
    border-radius: 50%;
}

.g-hero-content {
    position: relative;
    z-index: 1;
}

.g-hero h1 {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.g-hero p {
    opacity: 0.9;
    font-size: 0.9rem;
}

.g-hero-green {
    background: linear-gradient(135deg, var(--success) 0%, #059669 100%);
}

.g-hero-accent {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
}

/* ==========================================
   BOTOES
   ========================================== */
.g-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    line-height: 1;
}

.g-btn-primary { background: var(--primary); color: white; }
.g-btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); box-shadow: var(--shadow-md); color: white; }

.g-btn-success { background: var(--success); color: white; }
.g-btn-success:hover { background: #059669; transform: translateY(-1px); color: white; }

.g-btn-accent { background: var(--accent); color: white; }
.g-btn-accent:hover { background: var(--accent-dark); transform: translateY(-1px); color: white; }

.g-btn-outline { background: transparent; color: var(--gray-600); border: 1.5px solid var(--gray-300); }
.g-btn-outline:hover { background: var(--gray-50); color: var(--gray-800); border-color: var(--gray-400); }

.g-btn-ghost { background: rgba(255,255,255,0.15); border: 1px solid rgba(255,255,255,0.3); color: white; }
.g-btn-ghost:hover { background: rgba(255,255,255,0.25); color: white; }

.g-btn-danger { background: var(--danger); color: white; }
.g-btn-danger:hover { background: #dc2626; color: white; }

.g-btn-lg { padding: 14px 28px; font-size: 1rem; border-radius: var(--radius-lg); }
.g-btn-sm { padding: 6px 12px; font-size: 0.78rem; }

/* ==========================================
   FORMULARIOS
   ========================================== */
.g-input, .g-select {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    color: var(--gray-800);
    background: white;
    transition: var(--transition);
    outline: none;
}

.g-input:focus, .g-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37,99,235,0.12);
}

.g-label {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--gray-600);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: 6px;
}

.g-form-group {
    margin-bottom: 16px;
}

/* ==========================================
   BADGES
   ========================================== */
.g-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 600;
}

.g-badge-success { background: var(--success-50); color: var(--success); }
.g-badge-warning { background: var(--warning-50); color: var(--warning); }
.g-badge-danger { background: var(--danger-50); color: var(--danger); }
.g-badge-primary { background: var(--primary-50); color: var(--primary); }
.g-badge-gray { background: var(--gray-100); color: var(--gray-600); }

/* ==========================================
   TABELAS
   ========================================== */
.g-table {
    width: 100%;
    border-collapse: collapse;
}

.g-table thead {
    background: var(--gray-50);
}

.g-table thead th {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 12px 16px;
    border-bottom: 1px solid var(--gray-200);
    text-align: left;
}

.g-table tbody td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--gray-100);
    font-size: 0.875rem;
    vertical-align: middle;
}

.g-table tbody tr:hover {
    background: var(--gray-50);
}

.g-table tbody tr:last-child td {
    border-bottom: none;
}

/* ==========================================
   PAGINAS ESPECIAIS (Em Manutencao / Em Desenvolvimento)
   ========================================== */
.g-status-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    text-align: center;
    padding: 40px;
}

.g-status-icon {
    font-size: 4rem;
    margin-bottom: 24px;
    opacity: 0.6;
}

.g-status-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: 8px;
}

.g-status-text {
    font-size: 0.95rem;
    color: var(--gray-500);
    max-width: 400px;
}

/* ==========================================
   GRID UTILITARIOS
   ========================================== */
.g-grid { display: grid; gap: 20px; }
.g-grid-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.g-grid-3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.g-grid-4 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }

.g-flex { display: flex; }
.g-flex-center { display: flex; align-items: center; justify-content: center; }
.g-flex-between { display: flex; align-items: center; justify-content: space-between; }
.g-gap-8 { gap: 8px; }
.g-gap-16 { gap: 16px; }
.g-gap-24 { gap: 24px; }

.g-mt-8 { margin-top: 8px; }
.g-mt-16 { margin-top: 16px; }
.g-mt-24 { margin-top: 24px; }
.g-mb-16 { margin-bottom: 16px; }
.g-mb-24 { margin-bottom: 24px; }
.g-text-center { text-align: center; }

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

.g-login-card {
    background: white;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    padding: 40px;
    width: 100%;
    max-width: 420px;
}

.g-login-card h2 {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: 4px;
}

.g-login-card p {
    color: var(--gray-500);
    font-size: 0.875rem;
    margin-bottom: 28px;
}

/* ==========================================
   RESPONSIVO
   ========================================== */
@media (max-width: 768px) {
    .g-header { padding: 0 16px; height: 60px; }
    .g-header-logo-text { display: none; }
    .g-main { padding: 76px 16px 16px; }
    .g-hero { padding: 24px; }
    .g-hero h1 { font-size: 1.25rem; }
    .g-footer-content { grid-template-columns: 1fr; }
    .g-footer-bottom { flex-direction: column; text-align: center; }
    .g-grid-2, .g-grid-3, .g-grid-4 { grid-template-columns: 1fr; }
}
