/* Datasite Fiscal - Front-end (tema vermelho/preto) */

:root {
    --sidebar-width: 280px;
    --header-height: 64px;
    --primary: #dc3545;
    --primary-dark: #c82333;
    --primary-light: #e74c5c;
    --accent: #ff4757;
    --dark: #0a0a0a;
    --dark-2: #1a1a1a;
    --dark-3: #2a2a2a;
    --sidebar-bg: linear-gradient(180deg, #0a0a0a 0%, #1a1a1a 100%);
    --sidebar-text: rgba(255,255,255,.9);
    --sidebar-hover: rgba(220, 53, 69, .15);
    --header-bg: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 50%, #2a2a2a 100%);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
    color: #333;
    line-height: 1.6;
}

/* Layout principal */
.app-header {
    height: var(--header-height);
    background: var(--header-bg);
    box-shadow: 0 2px 8px rgba(0,0,0,.3);
    border-bottom: 2px solid var(--primary);
}

.app-sidebar {
    width: var(--sidebar-width);
    min-height: calc(100vh - var(--header-height));
    background: var(--sidebar-bg);
    flex-shrink: 0;
    box-shadow: 2px 0 12px rgba(0,0,0,.2);
}

.app-main {
    flex: 1;
    padding: 2rem;
    overflow-x: auto;
    background: linear-gradient(135deg, #fafafa 0%, #f0f0f0 100%);
}

/* Logo área */
.sidebar-logo {
    padding: 1.5rem 1rem;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,.1);
    margin-bottom: 1rem;
}

.sidebar-logo-placeholder {
    width: 240px;
    height: 80px;
    background: #ffffff;
    border: 2px solid var(--primary);
    border-radius: 12px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--primary);
    box-shadow: 0 4px 12px rgba(220, 53, 69, .3);
    transition: all .3s;
    padding:3px;
}

.sidebar-logo-placeholder:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(220, 53, 69, .4);
}

/* Sidebar */
.sidebar-link {
    color: var(--sidebar-text);
    text-decoration: none;
    padding: .75rem 1.25rem;
    display: flex;
    align-items: center;
    gap: .75rem;
    border-radius: 8px;
    transition: all .2s ease;
    margin: .25rem .5rem;
    font-weight: 500;
    font-size: .95rem;
    position: relative;
    overflow: hidden;
}

.sidebar-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 3px;
    background: var(--primary);
    transform: scaleY(0);
    transition: transform .2s ease;
}

.sidebar-link:hover {
    color: #fff;
    background: var(--sidebar-hover);
    transform: translateX(4px);
}

.sidebar-link:hover::before {
    transform: scaleY(1);
}

.sidebar-link.active {
    color: #fff;
    background: linear-gradient(90deg, rgba(220, 53, 69, .25) 0%, rgba(220, 53, 69, .1) 100%);
    font-weight: 600;
    border-left: 3px solid var(--primary);
}

/* Header */
.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    color: #fff !important;
}

/* Login */
.login-layout {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--dark) 0%, var(--dark-2) 50%, var(--dark-3) 100%);
    position: relative;
}

.login-layout::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 50%, rgba(220, 53, 69, .1) 0%, transparent 50%);
}

.login-card {
    max-width: 420px;
    border-radius: 16px;
    box-shadow: 0 16px 48px rgba(0,0,0,.4), 0 0 0 1px rgba(220, 53, 69, .2);
    border: none;
    background: #fff;
    position: relative;
    z-index: 1;
}

.login-card .card-body {
    padding: 2.5rem;
}

/* Dashboard */
.card-indicator {
    border: none;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,.08);
    transition: all .3s ease;
    border-left: 4px solid var(--primary);
    background: #fff;
}

.card-indicator:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(220, 53, 69, .15);
}

.card-indicator .card-body {
    padding: 1.5rem;
}

/* Tabelas */
.table-container {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,.08);
    overflow: hidden;
    border: 1px solid rgba(0,0,0,.06);
}

.table thead.table-light {
    background: linear-gradient(180deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 2px solid var(--primary);
}

.table thead th {
    font-weight: 600;
    text-transform: uppercase;
    font-size: .8rem;
    letter-spacing: .5px;
    color: #495057;
}

/* Cards gerais */
.card {
    border-radius: 12px;
    border: none;
    box-shadow: 0 2px 8px rgba(0,0,0,.08);
}

.card-header {
    background: linear-gradient(180deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 2px solid var(--primary);
    font-weight: 600;
    text-transform: uppercase;
    font-size: .85rem;
    letter-spacing: .5px;
}

/* Badges */
.badge {
    padding: .35em .65em;
    font-weight: 600;
    border-radius: 6px;
}

.badge-status {
    font-weight: 600;
}

/* Botões */
.btn {
    border-radius: 8px;
    font-weight: 600;
    padding: .5rem 1.25rem;
    transition: all .2s ease;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    box-shadow: 0 2px 8px rgba(220, 53, 69, .3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(220, 53, 69, .4);
}

.btn-outline-light:hover {
    background: rgba(255,255,255,.1);
    border-color: rgba(255,255,255,.3);
}

.btn-outline-secondary {
    border-color: #6c757d;
    color: #6c757d;
}

.btn-outline-secondary:hover {
    background: #6c757d;
    color: #fff;
}

/* Títulos */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    letter-spacing: -0.5px;
}

.h3 {
    color: var(--dark);
}

/* Util */
.text-muted-small {
    font-size: .875rem;
    color: #6c757d;
}

/* Formulários */
.form-label {
    font-weight: 600;
    font-size: .9rem;
    color: #495057;
    margin-bottom: .375rem;
}

.form-control, .form-select {
    border-radius: 8px;
    border: 1px solid #dee2e6;
    transition: all .2s ease;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 .2rem rgba(220, 53, 69, .15);
}

/* Alerts */
.alert {
    border-radius: 8px;
    border: none;
}

.alert-danger {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    color: #721c24;
}

.alert-success {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
}

/* Animações e transições */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.card, .table-container {
    animation: fadeIn 0.3s ease;
}

/* Links */
a {
    color: var(--primary);
    transition: all .2s ease;
}

a:hover {
    color: var(--primary-dark);
}

/* Tabela hover */
.table-hover tbody tr {
    transition: all .15s ease;
}

.table-hover tbody tr:hover {
    background-color: rgba(0, 0, 0, .02);
}

/* Scrollbar customizado */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}
