/* ============================================
   CLIMATOP - DESIGN SYSTEM GLOBAL
   ============================================ */

:root {
    --ct-primary: #0073aa;
    --ct-primary-light: #00a0d2;
    --ct-success: #28a745;
    --ct-warning: #ffc107;
    --ct-danger: #dc3545;
    --ct-light: #f8f9fa;
    --ct-dark: #343a40;
    --ct-border: #dee2e6;
    --ct-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    --ct-shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --ct-transition: all 0.3s ease;
    --ct-spacing-xs: 8px;
    --ct-spacing-sm: 16px;
    --ct-spacing-md: 24px;
    --ct-spacing-lg: 32px;
}

/* ============================================
   RESET E TIPOGRAFIA
   ============================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--ct-dark);
    background-color: var(--ct-light);
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    margin-bottom: var(--ct-spacing-sm);
}

h1 { font-size: 2rem; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

/* ============================================
   LAYOUT PRINCIPAL: SIDEBAR + CONTENT
   ============================================ */

.ct-dashboard-wrapper {
    #display: grid;
    #grid-template-columns: 260px 1fr;
    padding-bottom: 10%;
    #gap: 0;
}

.ct-sidebar {
    background: linear-gradient(135deg, var(--ct-primary) 0%, var(--ct-primary-light) 100%);
    color: white;
    padding: var(--ct-spacing-md) 0;
    position: fixed;
    width: 260px;
    height: 100vh;
    overflow-y: auto;
    box-shadow: var(--ct-shadow-md);
    z-index: 1000;
    display: flex;
    flex-direction: column;
}

.ct-sidebar-header {
    padding: 0 var(--ct-spacing-md);
    margin-bottom: var(--ct-spacing-lg);
    text-align: center;
}

.ct-logo {
    width: 100%;
    max-width: 180px;
    height: auto;
    filter: brightness(0) invert(1);
}

.ct-sidebar-nav {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 0 var(--ct-spacing-sm);
}

.ct-nav-item {
    display: flex;
    align-items: center;
    gap: var(--ct-spacing-sm);
    padding: var(--ct-spacing-sm) var(--ct-spacing-md);
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    border-radius: 4px;
    transition: var(--ct-transition);
    font-size: 0.95rem;
}

.ct-nav-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.ct-nav-item.active {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border-left: 3px solid white;
    padding-left: calc(var(--ct-spacing-md) - 3px);
}

.ct-nav-item i {
    width: 20px;
    text-align: center;
}

.ct-nav-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.2);
    margin: var(--ct-spacing-sm) 0;
}

.ct-sidebar-footer {
    padding: var(--ct-spacing-md);
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.ct-logout {
    display: flex;
    align-items: center;
    gap: var(--ct-spacing-sm);
    padding: var(--ct-spacing-sm) var(--ct-spacing-md);
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    border-radius: 4px;
    transition: var(--ct-transition);
    font-size: 0.9rem;
}

.ct-logout:hover {
    background: rgba(255, 0, 0, 0.2);
    color: white;
}

.ct-main-content {
    /* grid-column: 2; */
    background: var(--ct-light);
    padding-top: 1%;
    /* overflow-y: auto; */
    width: 100%;
}

.ct-content-inner {
    max-width: 1200px;
    margin: 0 auto;
}

/* ============================================
   COMPONENTES: CARDS
   ============================================ */

.ct-card {
    background: white;
    border-radius: 8px;
    padding: var(--ct-spacing-md);
    box-shadow: var(--ct-shadow);
    transition: var(--ct-transition);
    border: 1px solid var(--ct-border);
}

.ct-card:hover {
    box-shadow: var(--ct-shadow-md);
}

.ct-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--ct-spacing-md);
    padding-bottom: var(--ct-spacing-sm);
    border-bottom: 1px solid var(--ct-border);
}

.ct-card-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--ct-dark);
}

.ct-card-content {
    font-size: 0.95rem;
    line-height: 1.6;
}

/* ============================================
   COMPONENTES: GRID LAYOUT
   ============================================ */

.ct-grid {
    display: grid;
    gap: var(--ct-spacing-md);
}

.ct-grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.ct-grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.ct-grid-4 {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

/* ============================================
   COMPONENTES: BOTÕES
   ============================================ */

.ct-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--ct-spacing-xs);
    padding: var(--ct-spacing-sm) var(--ct-spacing-md);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    transition: var(--ct-transition);
    text-decoration: none;
}

.ct-btn-primary {
    background: var(--ct-primary);
    color: white;
}

.ct-btn-primary:hover {
    background: #005a87;
    transform: translateY(-2px);
    box-shadow: var(--ct-shadow-md);
}

.ct-btn-secondary {
    background: var(--ct-light);
    color: var(--ct-primary);
    border: 1px solid var(--ct-primary);
}

.ct-btn-secondary:hover {
    background: var(--ct-primary);
    color: white;
}

.ct-btn-success {
    background: var(--ct-success);
    color: white;
}

.ct-btn-danger {
    background: var(--ct-danger);
    color: white;
}

/* ============================================
   COMPONENTES: BADGES
   ============================================ */

.ct-badge {
    display: inline-block;
    padding: 4px var(--ct-spacing-xs);
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
}

.ct-badge-primary { background: #e3f2fd; color: var(--ct-primary); }
.ct-badge-success { background: #e8f5e9; color: var(--ct-success); }
.ct-badge-warning { background: #fff3e0; color: #ff9800; }
.ct-badge-danger { background: #ffebee; color: var(--ct-danger); }

/* ============================================
   COMPONENTES: TABELAS
   ============================================ */

.ct-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.ct-table thead {
    background: #f5f5f5;
    border-bottom: 2px solid var(--ct-border);
}

.ct-table th {
    padding: var(--ct-spacing-sm);
    text-align: left;
    font-weight: 600;
    color: var(--ct-dark);
}

.ct-table td {
    padding: var(--ct-spacing-sm);
    border-bottom: 1px solid var(--ct-border);
}

.ct-table tbody tr:nth-child(even) {
    background: #fafafa;
}

.ct-table tbody tr:hover {
    background: #f0f0f0;
}

/* ============================================
   COMPONENTES: FORMULÁRIOS
   ============================================ */

.ct-form-group {
    margin-bottom: var(--ct-spacing-md);
}

.ct-form-label {
    display: block;
    font-weight: 500;
    margin-bottom: var(--ct-spacing-xs);
    color: var(--ct-dark);
}

.ct-form-control {
    width: 100%;
    padding: var(--ct-spacing-sm);
    border: 1px solid var(--ct-border);
    border-radius: 4px;
    font-size: 0.95rem;
    transition: var(--ct-transition);
    font-family: inherit;
}

.ct-form-control:focus {
    outline: none;
    border-color: var(--ct-primary);
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    .ct-dashboard-wrapper {
        grid-template-columns: 1fr;
    }

    .ct-sidebar {
        position: fixed;
        left: -260px;
        transition: left var(--ct-transition);
        z-index: 2000;
    }

    .ct-sidebar.active {
        left: 0;
    }

    .ct-main-content {
        grid-column: 1;
        padding: var(--ct-spacing-md);
    }

    .ct-grid-2,
    .ct-grid-3,
    .ct-grid-4 {
        grid-template-columns: 1fr;
    }

    h1 { font-size: 1.5rem; }
    h2 { font-size: 1.25rem; }
}

/* ============================================
   UTILITÁRIOS
   ============================================ */

.text-center { text-align: center; }
.text-right { text-align: right; }
.mt-1 { margin-top: var(--ct-spacing-xs); }
.mt-2 { margin-top: var(--ct-spacing-sm); }
.mt-3 { margin-top: var(--ct-spacing-md); }
.mb-1 { margin-bottom: var(--ct-spacing-xs); }
.mb-2 { margin-bottom: var(--ct-spacing-sm); }
.mb-3 { margin-bottom: var(--ct-spacing-md); }

/* Hide WP default elements */
#wpadminbar,
.wp-header,
.wp-sidebar-wrapper {
    display: none !important;
}
