/* ================================================
   SISPROV GeoMap License Server - CSS
   ================================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: #f0f2f5;
    color: #1f2937;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ================================================
   LOGIN PAGE
   ================================================ */

.login-page {
    background: linear-gradient(135deg, #1e3a5f 0%, #0f172a 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-container {
    background: white;
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 25px 80px rgba(0,0,0,0.3);
    width: 100%;
    max-width: 400px;
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header i {
    font-size: 48px;
    color: #3b82f6;
    margin-bottom: 15px;
}

.login-header h1 {
    font-size: 24px;
    color: #1f2937;
    margin-bottom: 5px;
}

.login-header p {
    color: #6b7280;
    font-size: 14px;
}

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

.login-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #374151;
    font-size: 14px;
}

.login-form input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 15px;
    transition: border-color 0.2s;
}

.login-form input:focus {
    outline: none;
    border-color: #3b82f6;
}

.login-footer {
    text-align: center;
    margin-top: 20px;
    color: #9ca3af;
    font-size: 12px;
}

/* ================================================
   NAVBAR
   ================================================ */

.navbar {
    background: linear-gradient(135deg, #1e3a5f 0%, #0f172a 100%);
    padding: 0 20px;
    display: flex;
    align-items: center;
    height: 60px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.navbar-brand {
    color: white;
    font-weight: 700;
    font-size: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.navbar-brand i {
    font-size: 24px;
    color: #60a5fa;
}

.navbar-menu {
    display: flex;
    margin-left: 40px;
    gap: 5px;
}

.navbar-item {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}

.navbar-item:hover {
    background: rgba(255,255,255,0.1);
    color: white;
}

.navbar-item.active {
    background: rgba(59, 130, 246, 0.3);
    color: white;
}

.navbar-user {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-info {
    color: rgba(255,255,255,0.9);
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ================================================
   CONTAINER & LAYOUT
   ================================================ */

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    flex: 1;
}

.row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.col-3 { flex: 0 0 25%; max-width: 25%; }
.col-4 { flex: 0 0 33.333%; max-width: 33.333%; }
.col-6 { flex: 0 0 50%; max-width: 50%; }
.col-8 { flex: 0 0 66.666%; max-width: 66.666%; }

/* ================================================
   PAGE HEADER
   ================================================ */

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.page-header h1 {
    font-size: 24px;
    color: #1f2937;
    display: flex;
    align-items: center;
    gap: 12px;
}

.page-header h1 i {
    color: #3b82f6;
}

.header-actions {
    display: flex;
    gap: 10px;
}

/* ================================================
   CARDS
   ================================================ */

.card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin-bottom: 20px;
    overflow: hidden;
}

.card-header {
    padding: 15px 20px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-header h2 {
    font-size: 16px;
    color: #374151;
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-header h2 i {
    color: #3b82f6;
}

.card-body {
    padding: 20px;
}

/* ================================================
   STATS GRID
   ================================================ */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 20px;
}

.stat-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
a.stat-card { text-decoration:none; color:inherit; transition:transform .15s, box-shadow .15s; cursor:pointer; }
a.stat-card:hover { transform:translateY(-2px); box-shadow:0 4px 12px rgba(0,0,0,.15); }

.pagination { display:flex; align-items:center; justify-content:center; gap:6px; margin-top:20px; padding:10px 0; }
.pagination a, .pagination span { padding:6px 12px; border-radius:6px; font-size:13px; text-decoration:none; }
.pagination a { background:white; border:1px solid #e2e8f0; color:#4a5568; }
.pagination a:hover { background:#f1f5f9; border-color:#3b82f6; color:#3b82f6; }
.pagination span.current { background:#3b82f6; color:white; border:1px solid #3b82f6; }
.pagination span.disabled { color:#a0aec0; border:1px solid #e2e8f0; background:#f8fafc; }
.pagination .page-info { font-size:12px; color:#718096; margin:0 8px; }

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: white;
}

.stat-icon.bg-primary { background: linear-gradient(135deg, #3b82f6, #2563eb); }
.stat-icon.bg-success { background: linear-gradient(135deg, #10b981, #059669); }
.stat-icon.bg-warning { background: linear-gradient(135deg, #f59e0b, #d97706); }
.stat-icon.bg-danger { background: linear-gradient(135deg, #ef4444, #dc2626); }

.stat-info h3 {
    font-size: 28px;
    color: #1f2937;
    line-height: 1;
}

.stat-info p {
    color: #6b7280;
    font-size: 13px;
    margin-top: 4px;
}

/* ================================================
   BUTTONS
   ================================================ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.btn-primary {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
}

.btn-success {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
}

.btn-warning {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
}

.btn-outline {
    background: white;
    border: 1px solid #d1d5db;
    color: #374151;
}

.btn-outline:hover {
    background: #f3f4f6;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

.btn-block {
    width: 100%;
}

/* ================================================
   TABLES
   ================================================ */

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

.table th {
    font-weight: 600;
    color: #6b7280;
    font-size: 12px;
    text-transform: uppercase;
    background: #f9fafb;
}

.table tbody tr:hover {
    background: #f9fafb;
}

.table code {
    background: #f3f4f6;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 12px;
}

/* ================================================
   BADGES
   ================================================ */

.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-lg {
    padding: 6px 14px;
    font-size: 12px;
}

.badge-pending { background: #fef3c7; color: #92400e; }
.badge-active { background: #d1fae5; color: #065f46; }
.badge-expired { background: #fee2e2; color: #991b1b; }
.badge-blocked_clone { background: #fee2e2; color: #991b1b; }
.badge-revoked { background: #f3f4f6; color: #374151; }
.badge-success { background: #d1fae5; color: #065f46; }
.badge-danger { background: #fee2e2; color: #991b1b; }
.badge-info { background: #dbeafe; color: #1e40af; }
.badge-warning { background: #fef3c7; color: #92400e; }

.badge-primary { background: #dbeafe; color: #1d4ed8; }
.badge-secondary { background: #f3f4f6; color: #374151; }
.badge-plan { background: #ede9fe; color: #5b21b6; }

.badge-superadmin { background: #fce7f3; color: #9d174d; }
.badge-admin { background: #dbeafe; color: #1e40af; }
.badge-viewer { background: #f3f4f6; color: #374151; }

/* ================================================
   FORMS
   ================================================ */

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

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

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #3b82f6;
}

.form-row {
    display: flex;
    gap: 15px;
}

.form-row .col-3 { flex: 0 0 calc(25% - 11.5px); }
.form-row .col-4 { flex: 0 0 calc(33.333% - 10px); }
.form-row .col-6 { flex: 0 0 calc(50% - 7.5px); }
.form-row .col-12 { flex: 0 0 100%; }

.form-section {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e5e7eb;
}

.form-section h3 {
    font-size: 15px;
    color: #374151;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-section h3 i {
    color: #3b82f6;
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.form-help {
    display: block;
    margin-top: 6px;
    color: #6b7280;
    font-size: 12px;
    line-height: 1.45;
}

.server-form-wide .form-section {
    margin-bottom: 28px;
}

.checkbox-card {
    min-height: 44px;
    padding: 11px 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: #f9fafb;
}

.input-group {
    display: flex;
    gap: 10px;
}

.input-group input {
    flex: 1;
}

.filters-form,
.filters {
    display: flex;
    gap: 10px;
    align-items: center;
}

.filters-form .form-group,
.filters .form-group {
    margin-bottom: 0;
}

.filters-form select,
.filters-form input,
.filters select,
.filters input {
    padding: 8px 12px;
    font-size: 13px;
}

/* ================================================
   ALERTS
   ================================================ */

.alerts {
    margin-bottom: 20px;
}

.alert {
    padding: 12px 20px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    position: relative;
}

.alert-success { background: #d1fae5; color: #065f46; }
.alert-danger { background: #fee2e2; color: #991b1b; }
.alert-warning { background: #fef3c7; color: #92400e; }
.alert-info { background: #dbeafe; color: #1e40af; }

.alert-close {
    position: absolute;
    right: 15px;
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    opacity: 0.5;
}

.alert-close:hover {
    opacity: 1;
}

/* ================================================
   INFO GRID
   ================================================ */

.info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.info-item {
    padding: 10px;
    background: #f9fafb;
    border-radius: 8px;
}

.info-item label {
    display: block;
    font-size: 11px;
    color: #6b7280;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.info-item span,
.info-item code {
    font-size: 14px;
    color: #1f2937;
}

.license-key-display {
    background: #f9fafb;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
}

.license-key-display code,
.license-key-big {
    font-size: 18px;
    font-weight: 600;
    color: #3b82f6;
}

.status-item {
    padding: 8px 0;
    border-bottom: 1px solid #e5e7eb;
}

.status-item:last-child {
    border-bottom: none;
}

.status-item label {
    display: block;
    font-size: 11px;
    color: #6b7280;
    margin-bottom: 2px;
}

/* ================================================
   UTILITIES
   ================================================ */

.text-muted { color: #6b7280; }
.text-danger { color: #dc2626; }
.text-center { text-align: center; }

.mt-3 { margin-top: 15px; }
.mb-3 { margin-bottom: 15px; }

code {
    background: #f3f4f6;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Monaco', 'Consolas', monospace;
    font-size: 13px;
}

hr {
    border: none;
    border-top: 1px solid #e5e7eb;
    margin: 15px 0;
}

/* ================================================
   FOOTER
   ================================================ */

.footer {
    text-align: center;
    padding: 20px;
    color: #9ca3af;
    font-size: 13px;
}

/* ================================================
   RESPONSIVE
   ================================================ */

@media (max-width: 1200px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .navbar-menu {
        display: none;
    }
    
    .row {
        flex-direction: column;
    }
    
    .col-4, .col-6, .col-8, .col-12 {
        flex: 0 0 100%;
        max-width: 100%;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
    }
}

/* ================================================
   ESTILOS ADICIONAIS
   ================================================ */

.nav-badge {
    background: #ef4444;
    color: white;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: 5px;
}

.stat-highlight {
    border: 2px solid #f59e0b;
    animation: pulse-border 2s infinite;
}

@keyframes pulse-border {
    0%, 100% { border-color: #f59e0b; }
    50% { border-color: #fbbf24; }
}

.card-highlight {
    border: 2px solid #f59e0b;
    background: #fffbeb;
}

.card-highlight .card-header {
    background: #fef3c7;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 0;
}

.checkbox-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.checkbox-group label {
    margin: 0;
    cursor: pointer;
    font-weight: normal;
}

.badge-approved { background: #d1fae5; color: #065f46; }
.badge-rejected { background: #fee2e2; color: #991b1b; }
.badge-secondary { background: #e5e7eb; color: #374151; }

.bg-secondary {
    background: linear-gradient(135deg, #6b7280, #4b5563);
}

/* ================================================
   LICENSE DETAIL - Status Banner
   ================================================ */

.license-status-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    border-radius: 12px;
    margin-bottom: 24px;
    color: white;
}

.license-status-banner.license-status-active {
    background: linear-gradient(135deg, #059669, #10b981);
}

.license-status-banner.license-status-suspended {
    background: linear-gradient(135deg, #d97706, #f59e0b);
}

.license-status-banner.license-status-expired {
    background: linear-gradient(135deg, #b45309, #d97706);
}

.license-status-banner.license-status-revoked,
.license-status-banner.license-status-blocked_clone {
    background: linear-gradient(135deg, #dc2626, #ef4444);
}

.license-status-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.license-status-icon {
    font-size: 28px;
    opacity: 0.9;
}

.license-status-label {
    display: block;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.license-status-key {
    display: block;
    font-size: 13px;
    opacity: 0.85;
    font-family: monospace;
}

.license-status-right {
    display: flex;
    align-items: center;
}

/* ================================================
   RELEASE HARDENING UI
   ================================================ */
.filter-actions-inline {
    display: flex;
    align-items: flex-end;
    gap: 8px;
}

.callout {
    border-radius: 10px;
    padding: 14px 16px;
    border: 1px solid #dbe4f0;
    background: #f8fafc;
    color: #334155;
    min-height: 100%;
}

.callout strong {
    display: block;
    margin-bottom: 6px;
}

.callout p {
    margin: 0 0 10px;
    line-height: 1.45;
}

.callout-info {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #1e3a8a;
}

.callout-success {
    background: #ecfdf5;
    border-color: #a7f3d0;
    color: #166534;
}

.callout-warning {
    background: #fffbeb;
    border-color: #fcd34d;
    color: #92400e;
}

.callout-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 14px;
    font-size: 13px;
}

.release-flag-stack {
    display: grid;
    gap: 10px;
}

@media (max-width: 900px) {
    .callout-grid {
        grid-template-columns: 1fr;
    }
}
