/**
 * Identidade Visual - Webhook Omie
 * Cores principais: #1e3a3a e #2c4f4f (tons teal/verde-azulado)
 */

/* === VARIÁVEIS === */
:root {
    --color-primary: #1e3a3a;
    --color-primary-light: #2c4f4f;
    --color-success: #28a745;
    --color-warning: #ffc107;
    --color-danger: #dc3545;
    --color-info: #17a2b8;
    --color-secondary: #6c757d;

    --gradient-primary: linear-gradient(135deg, #1e3a3a 0%, #2c4f4f 100%);
    --gradient-success: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    --gradient-warning: linear-gradient(135deg, #ffc107 0%, #ffca2c 100%);
    --gradient-danger: linear-gradient(135deg, #dc3545 0%, #e4606d 100%);

    --shadow-sm: 0 2px 4px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.15);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.2);
    --shadow-xl: 0 12px 40px rgba(0,0,0,0.25);

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    color: #333;
    line-height: 1.6;
}

/* === GLASSMORPHISM === */
.glass {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.glass-dark {
    background: rgba(30, 58, 58, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
}

/* === CARDS === */
.card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    animation: fadeIn 0.5s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.card-glass {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.4);
}

.card-header {
    background: rgba(30, 58, 58, 0.05);
    padding: 16px 24px;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    border-bottom: 2px solid rgba(30, 58, 58, 0.1);
    font-weight: 600;
    color: var(--color-primary);
}

/* === BOTÕES === */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    text-align: center;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn:active {
    transform: translateY(0);
}

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

.btn-primary:hover {
    box-shadow: 0 6px 20px rgba(30, 58, 58, 0.4);
}

.btn-success {
    background: var(--gradient-success);
    color: white;
}

.btn-success:hover {
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
}

.btn-warning {
    background: var(--gradient-warning);
    color: #333;
}

.btn-warning:hover {
    box-shadow: 0 6px 20px rgba(255, 193, 7, 0.4);
}

.btn-danger {
    background: var(--gradient-danger);
    color: white;
}

.btn-secondary {
    background: var(--color-secondary);
    color: white;
}

.btn-outline-primary {
    background: transparent;
    border: 2px solid var(--color-primary);
    color: var(--color-primary);
}

.btn-outline-primary:hover {
    background: var(--gradient-primary);
    color: white;
}

/* === BADGES === */
.badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: white;
}

.badge-primary {
    background: var(--gradient-primary);
}

.badge-success {
    background: var(--gradient-success);
}

.badge-warning {
    background: var(--gradient-warning);
    color: #333;
}

.badge-danger {
    background: var(--gradient-danger);
}

.badge-secondary {
    background: linear-gradient(135deg, #6c757d 0%, #868e96 100%);
}

/* === TABELAS === */
.table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.table thead {
    background: var(--gradient-primary);
    color: white;
}

.table th {
    padding: 16px;
    text-align: left;
    font-weight: 600;
}

.table td {
    padding: 14px 16px;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.table-striped tbody tr:nth-child(odd) {
    background: rgba(30, 58, 58, 0.02);
}

.table tbody tr {
    transition: all 0.2s ease;
}

.table tbody tr:hover {
    background: rgba(30, 58, 58, 0.08);
    transform: scale(1.01);
}

/* === FORMULÁRIOS === */
.form-control,
.form-select,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
select,
textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: var(--radius-md);
    font-size: 14px;
    transition: all 0.3s ease;
    background: white;
}

.form-control:focus,
.form-select:focus,
input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(30, 58, 58, 0.1);
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--color-primary);
    font-size: 14px;
}

/* === MODAIS === */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: white;
    border-radius: var(--radius-xl);
    padding: 32px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
    animation: slideUp 0.3s ease;
}

.modal-glass {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 2px solid rgba(30, 58, 58, 0.1);
}

/* === ALERTS === */
.alert {
    padding: 16px 20px;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
    border-left: 4px solid;
    animation: slideDown 0.3s ease;
}

.alert-success {
    background: rgba(40, 167, 69, 0.1);
    border-color: var(--color-success);
    color: #155724;
}

.alert-warning {
    background: rgba(255, 193, 7, 0.1);
    border-color: var(--color-warning);
    color: #856404;
}

.alert-danger {
    background: rgba(220, 53, 69, 0.1);
    border-color: var(--color-danger);
    color: #721c24;
}

.alert-info {
    background: rgba(23, 162, 184, 0.1);
    border-color: var(--color-info);
    color: #0c5460;
}

/* === LOADING === */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(30, 58, 58, 0.9);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* === ANIMAÇÕES === */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideDown {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* === UTILIDADES === */
.text-primary { color: var(--color-primary) !important; }
.text-success { color: var(--color-success) !important; }
.text-warning { color: var(--color-warning) !important; }
.text-danger { color: var(--color-danger) !important; }
.text-secondary { color: var(--color-secondary) !important; }

.bg-primary { background: var(--gradient-primary) !important; }
.bg-success { background: var(--gradient-success) !important; }
.bg-warning { background: var(--gradient-warning) !important; }

.shadow-sm { box-shadow: var(--shadow-sm); }
.shadow-md { box-shadow: var(--shadow-md); }
.shadow-lg { box-shadow: var(--shadow-lg); }
.shadow-xl { box-shadow: var(--shadow-xl); }

.rounded-sm { border-radius: var(--radius-sm); }
.rounded-md { border-radius: var(--radius-md); }
.rounded-lg { border-radius: var(--radius-lg); }
.rounded-xl { border-radius: var(--radius-xl); }

/* === RESPONSIVO === */
@media (max-width: 768px) {
    .card {
        padding: 16px;
        border-radius: var(--radius-md);
    }

    .btn {
        padding: 10px 20px;
        font-size: 13px;
    }

    .table th,
    .table td {
        padding: 10px 12px;
        font-size: 13px;
    }

    .modal-content {
        padding: 20px;
        border-radius: var(--radius-lg);
    }
}
