/**
 * URZZO JEANS - Sistema de Gestão
 * Desenvolvido por Usko Negócios Digitais
 * 
 * Paleta de Cores:
 * - Bege: #D4C4B7
 * - Preto: #2B2B2B
 */

/* ==================== RESET E BASE ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f5f5;
    color: #2B2B2B;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

/* ==================== HEADER ==================== */
.main-header {
    background-color: #2B2B2B;
    padding: 15px 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

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

.logo-img {
    height: 50px;
    width: auto;
}

.main-nav {
    flex: 1;
    display: flex;
    justify-content: flex-end;
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: #D4C4B7;
    font-size: 24px;
    cursor: pointer;
    padding: 5px 10px;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 10px;
    align-items: center;
}

.nav-menu li a {
    color: #D4C4B7;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 5px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
}

.nav-menu li a:hover,
.nav-menu li a.active {
    background-color: #D4C4B7;
    color: #2B2B2B;
}

.logout-link {
    background-color: rgba(212, 196, 183, 0.1) !important;
    border: 1px solid #D4C4B7;
}

.logout-link:hover {
    background-color: #D4C4B7 !important;
    color: #2B2B2B;
}

/* ==================== MAIN CONTENT ==================== */
.main-content {
    flex: 1;
    padding: 30px 0;
}

/* ==================== FOOTER ==================== */
.main-footer {
    background-color: #2B2B2B;
    color: #D4C4B7;
    padding: 20px 0;
    text-align: center;
    margin-top: auto;
}

.main-footer p {
    margin: 5px 0;
    font-size: 14px;
}

.developed-by {
    font-size: 13px;
    opacity: 0.9;
}

/* ==================== LOGIN PAGE ==================== */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #D4C4B7 0%, #2B2B2B 100%);
    padding: 20px;
}

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

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

.login-logo img {
    max-width: 200px;
    height: auto;
}

.login-title {
    text-align: center;
    color: #2B2B2B;
    margin-bottom: 30px;
    font-size: 24px;
}

/* ==================== FORMS ==================== */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #2B2B2B;
    font-weight: 500;
    font-size: 14px;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #D4C4B7;
    border-radius: 5px;
    font-size: 15px;
    transition: all 0.3s ease;
    background-color: #fff;
}

.form-control:focus {
    outline: none;
    border-color: #2B2B2B;
    box-shadow: 0 0 0 3px rgba(43, 43, 43, 0.1);
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

select.form-control {
    cursor: pointer;
}

/* ==================== BUTTONS ==================== */
.btn {
    padding: 12px 25px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    justify-content: center;
}

.btn-primary {
    background-color: #2B2B2B;
    color: #D4C4B7;
    width: 100%;
}

.btn-primary:hover {
    background-color: #1a1a1a;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(43, 43, 43, 0.3);
}

.btn-success {
    background-color: #28a745;
    color: white;
}

.btn-success:hover {
    background-color: #218838;
}

.btn-danger {
    background-color: #dc3545;
    color: white;
}

.btn-danger:hover {
    background-color: #c82333;
}

.btn-warning {
    background-color: #ffc107;
    color: #2B2B2B;
}

.btn-warning:hover {
    background-color: #e0a800;
}

.btn-secondary {
    background-color: #D4C4B7;
    color: #2B2B2B;
}

.btn-secondary:hover {
    background-color: #c4b4a7;
}

.btn-sm {
    padding: 8px 15px;
    font-size: 13px;
}

/* ==================== CARDS ==================== */
.card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 25px;
    margin-bottom: 25px;
}

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

.card-title {
    font-size: 22px;
    color: #2B2B2B;
    margin: 0;
}

.card-body {
    padding: 0;
}

/* ==================== STATS CARDS ==================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

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

.stat-icon.bg-primary {
    background: linear-gradient(135deg, #2B2B2B 0%, #1a1a1a 100%);
}

.stat-icon.bg-success {
    background: linear-gradient(135deg, #28a745 0%, #218838 100%);
}

.stat-icon.bg-warning {
    background: linear-gradient(135deg, #ffc107 0%, #e0a800 100%);
}

.stat-icon.bg-danger {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
}

.stat-info h3 {
    margin: 0;
    font-size: 28px;
    color: #2B2B2B;
}

.stat-info p {
    margin: 5px 0 0 0;
    color: #666;
    font-size: 14px;
}

/* ==================== TABLES ==================== */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

table thead {
    background-color: #2B2B2B;
    color: #D4C4B7;
}

table thead th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    font-size: 14px;
    white-space: nowrap;
}

table tbody td {
    padding: 12px 15px;
    border-bottom: 1px solid #e0e0e0;
    font-size: 14px;
}

table tbody tr:hover {
    background-color: #f8f9fa;
}

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

.table-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.badge {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    display: inline-block;
}

.badge-success {
    background-color: #d4edda;
    color: #155724;
}

.badge-danger {
    background-color: #f8d7da;
    color: #721c24;
}

.badge-warning {
    background-color: #fff3cd;
    color: #856404;
}

.badge-info {
    background-color: #d1ecf1;
    color: #0c5460;
}

/* ==================== ALERTS ==================== */
.alert {
    padding: 15px 20px;
    border-radius: 5px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: opacity 0.3s ease;
}

.alert i {
    font-size: 20px;
}

.alert-success {
    background-color: #d4edda;
    border-left: 4px solid #28a745;
    color: #155724;
}

.alert-danger {
    background-color: #f8d7da;
    border-left: 4px solid #dc3545;
    color: #721c24;
}

.alert-warning {
    background-color: #fff3cd;
    border-left: 4px solid #ffc107;
    color: #856404;
}

.alert-info {
    background-color: #d1ecf1;
    border-left: 4px solid #17a2b8;
    color: #0c5460;
}

/* ==================== MODAL ==================== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 10px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #D4C4B7;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
}

/* ==================== FORM GRID ==================== */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

/* ==================== EMPTY STATE ==================== */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.empty-state i {
    font-size: 80px;
    color: #D4C4B7;
    margin-bottom: 20px;
}

.empty-state h3 {
    font-size: 24px;
    color: #2B2B2B;
    margin-bottom: 10px;
}

.empty-state p {
    font-size: 16px;
    margin-bottom: 20px;
}

/* ==================== RESPONSIVE - MOBILE FIRST ==================== */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block;
    }

    .nav-menu {
        position: absolute;
        top: 100%;
        right: 0;
        background-color: #2B2B2B;
        flex-direction: column;
        width: 100%;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
        box-shadow: 0 5px 10px rgba(0,0,0,0.2);
    }

    .nav-menu.active {
        max-height: 400px;
        padding: 10px 0;
    }

    .nav-menu li {
        width: 100%;
    }

    .nav-menu li a {
        width: 100%;
        padding: 15px 20px;
        border-radius: 0;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .form-row,
    .form-grid {
        grid-template-columns: 1fr;
    }

    .table-responsive {
        border-radius: 5px;
    }

    table {
        font-size: 13px;
    }

    table thead th,
    table tbody td {
        padding: 10px 8px;
    }

    .card {
        padding: 20px 15px;
    }

    .card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .btn {
        width: 100%;
    }

    .table-actions {
        flex-direction: column;
    }

    .table-actions .btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .login-box {
        padding: 30px 20px;
    }

    .logo-img {
        height: 40px;
    }

    .modal-content {
        padding: 20px 15px;
        width: 95%;
    }

    .stat-card {
        padding: 20px 15px;
    }

    .stat-icon {
        width: 60px;
        height: 60px;
        font-size: 30px;
    }

    .stat-info h3 {
        font-size: 24px;
    }
}

/* ==================== UTILITY CLASSES ==================== */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.mt-20 {
    margin-top: 20px;
}

.mb-20 {
    margin-bottom: 20px;
}

.d-flex {
    display: flex;
}

.justify-between {
    justify-content: space-between;
}

.align-center {
    align-items: center;
}

.gap-10 {
    gap: 10px;
}

.text-muted {
    color: #666;
    font-size: 14px;
}

.font-bold {
    font-weight: 600;
}