/* GoldStar Energy - Base Styles 
   Variables are now defined in dynamic_style.php based on config.php
*/

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--bg-color);
    color: var(--text-color);
}

/* Navbar */
.navbar {
    background: var(--secondary-color);
    color: var(--white);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.navbar .brand {
    font-size: 1.4rem;
    font-weight: bold;
    color: var(--primary-color);
}

.navbar a {
    color: var(--white);
    text-decoration: none;
    margin-left: 20px;
    font-weight: 500;
    transition: color 0.2s;
}

.navbar a:hover {
    color: var(--primary-color);
}

@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        align-items: flex-start;
        padding: 1rem;
    }
    .navbar .menu {
        margin-top: 10px;
        width: 100%;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    .navbar a {
        margin-left: 10px;
        font-size: 0.9rem;
    }
}

/* Containers */
.container {
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* Cards */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-top: 20px;
}

.card {
    background: var(--white);
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05); /* Softer shadow */
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
    border-top: 4px solid var(--primary-color); /* Restoring Orange Border */
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.1);
}

/* Card Variants based on content (can be handled by classes) */
.card.gold-accent {
    border-top-color: var(--primary-color);
}

.card h3 {
    color: var(--primary-color); /* Restoring Orange Title */
    margin-top: 0;
    font-size: 1.5rem;
}

.card p {
    color: var(--text-color);
    margin-bottom: 20px;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 25px;
    background: var(--primary-color);
    color: var(--white);
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    border: 1px solid rgba(0,0,0,0.1); /* Added border as requested */
    cursor: pointer;
    transition: background 0.2s;
    font-size: 0.95rem;
}

.btn:hover {
    filter: brightness(90%);
}

.btn-secondary {
    background: var(--secondary-color);
}

.btn-secondary:hover {
    background: #34495e;
}

.btn-danger {
    background: var(--danger);
}


.btn-edit {
    /* background: var(--secondary-color); Removed to use default primary orange */ 
    background: #e67e22; /* A slightly different orange/darker orange for distinctness, or just let it fall back */
}

.btn-cancel {
    background: #95a5a6; /* Keep this or use var */
    color: #fff;
}

.btn-cancel:hover {
    background: #7f8c8d;
}

/* Forms */
.form-container {
    background: var(--white);
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--secondary-color);
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
select,
textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    box-sizing: border-box;
    font-family: inherit;
    font-size: 1rem;
}

input:focus, select:focus, textarea:focus {
    border-color: var(--primary-color);
    outline: none;
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    background: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.25); /* Even Stronger shadow */
    border: 1px solid var(--border-color); /* Subtle border */
}

th {
    background: var(--primary-color); /* Was secondary-color (blue). Changed to Orange for "orange tones" */
    color: var(--white);
    padding: 15px;
    text-align: left;
}

td {
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
}

tr:hover {
    background-color: #f8f9fa;
}

/* Status Badges */
.status {
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 0.85rem;
    font-weight: bold;
}
.status.aprovado { background: #d4edda; color: #155724; }
.status.enviado { background: #cce5ff; color: #004085; }
.status.rascunho { background: #fff3cd; color: #856404; }
.status.rejeitado { background: #f8d7da; color: #721c24; }
.status.venda_concluida { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.status.aguardando { background: #fff3cd; color: #856404; border: 1px solid #ffeeba; }
.status.nova_proposta { background: #d1ecf1; color: #0c5460; border: 1px solid #bee5eb; }
.status.cancelado { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }
.status.oculto { background: #e2e3e5; color: #383d41; border: 1px solid #d6d8db; }

/* Dashboard Header */
.dashboard-header {
    margin-bottom: 30px;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 15px;
}

.dashboard-header h1 {
    color: var(--secondary-color);
    margin: 0;
}

.dashboard-header p {
    color: #7f8c8d; /* Or var(--secondary-text) if created */
    margin: 5px 0 0;
}

/* Modal Styles */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: var(--white);
    padding: 25px;
    border-radius: 8px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    text-align: center;
}

.modal-actions {
    margin-top: 20px;
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

/* Report Page Styles */
.filter-bar {
    background: var(--white);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    border: 1px solid var(--border-color); /* Border added */
}

.filter-form {
    display: flex;
    gap: 15px;
    align-items: flex-end;
    flex-wrap: wrap; /* Allow wrapping */
}

.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.kpi-card {
    background: var(--white);
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    border: 1px solid #ddd; /* Border added */
    transition: transform 0.2s;
}

.kpi-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.1);
}

.kpi-value {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--secondary-color);
    margin: 10px 0;
}

.kpi-label {
    color: #7f8c8d;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.chart-container {
    background: var(--white);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    border: 1px solid #ddd; /* Border added */
    height: 400px;
    margin-bottom: 30px;
}

@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        align-items: flex-start;
        padding: 1rem;
    }
    .navbar .menu {
        margin-top: 10px;
        width: 100%;
        display: flex;
        justify-content: space-between;
        align-items: center;
        flex-wrap: wrap;
        gap: 10px;
    }
    .navbar a, .navbar span {
        margin-left: 0;
        margin-right: 15px;
        font-size: 0.9rem;
    }
    
    /* Page Headers on Mobile */
    .header {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 15px;
    }
    .header h1 {
        margin-bottom: 5px;
    }
    .header > div {
        width: 100%;
        display: flex;
        gap: 10px;
        flex-wrap: wrap;
    }
    .header .btn {
        flex: 1;
        text-align: center;
        white-space: nowrap;
    }

    .filter-form {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-form .form-group {
        width: 100%;
        margin-bottom: 10px;
    }
    
    .filter-form .btn {
        width: 100%;
        margin-bottom: 10px;
    }
}

/* Table Responsiveness */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-top: 20px;
    border: 1px solid var(--border-color);
}

.table-responsive table {
    margin-top: 0; /* Remove margin inside wrapper */
    border: none;
    box-shadow: none;
}
