/**
 * DinheiroCard - Main Stylesheet
 * Identidade visual baseada em laranja/moderno
 */

/* ================================
   Base & Typography
   ================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 0.9375rem;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--background);
}

a {
    color: var(--brand-primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--brand-accent);
}

/* ================================
   Sidebar
   ================================ */

.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    height: 100vh;
    background: var(--brand-secondary);
    color: #fff;
    display: flex;
    flex-direction: column;
    z-index: 1000;
    transition: transform 0.3s ease;
}

.sidebar-header {
    padding: 1.25rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    color: #fff;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
}

.sidebar-logo {
    height: 45px;
    flex-shrink: 0;
}

.sidebar-title {
    font-size: 1.1rem;
    font-weight: 700;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-nav {
    flex: 1;
    padding: 1rem 0;
    overflow-y: auto;
}

.sidebar-nav .nav-link {
    display: flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    color: rgba(255, 255, 255, 0.85);
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.sidebar-nav .nav-link i {
    font-size: 1.25rem;
    margin-right: 0.75rem;
    width: 24px;
    text-align: center;
}

.sidebar-nav .nav-link:hover,
.sidebar-nav .nav-link.active {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.sidebar-nav .nav-link.active {
    border-left: 3px solid #fff;
}

.sidebar-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.user-info {
    display: flex;
    align-items: center;
}

.user-avatar {
    font-size: 2rem;
    margin-right: 0.75rem;
    opacity: 0.8;
}

.user-details {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-weight: 600;
    font-size: 0.875rem;
}

.user-role {
    font-size: 0.75rem;
    opacity: 0.7;
}

/* ================================
   Main Content
   ================================ */

.main-content {
    margin-left: 280px;
    min-height: 100vh;
    transition: margin-left 0.3s ease;
}

.top-navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.sidebar-toggle {
    display: none;
    font-size: 1.5rem;
    color: var(--text-primary);
}

/* ================================
   Page Header
   ================================ */

.page-header {
    margin-bottom: 1.5rem;
}

.page-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

/* ================================
   Cards
   ================================ */

.card {
    background: var(--surface);
    border: none;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.card-header {
    background: transparent;
    border-bottom: 1px solid var(--border);
    padding: 1rem 1.25rem;
}

.card-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.card-body {
    padding: 1.25rem;
}

/* ================================
   Stats Cards
   ================================ */

.stat-card {
    background: var(--surface);
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-right: 1rem;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 0;
}

/* Soft backgrounds */
.bg-primary-soft {
    background: rgba(236, 104, 29, 0.1);
}

.bg-success-soft {
    background: rgba(16, 185, 129, 0.1);
}

.bg-warning-soft {
    background: rgba(245, 158, 11, 0.1);
}

.bg-danger-soft {
    background: rgba(239, 68, 68, 0.1);
}

.bg-info-soft {
    background: rgba(59, 130, 246, 0.1);
}

/* ================================
   Quick Action Cards
   ================================ */

.quick-action-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background: var(--surface);
    border-radius: 12px;
    padding: 1.5rem;
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.quick-action-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    color: var(--text-primary);
}

.quick-action-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #fff;
    margin-bottom: 1rem;
}

.quick-action-card h6 {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

/* ================================
   Tables
   ================================ */

.table {
    margin-bottom: 0;
}

.table th {
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    border-bottom: 2px solid var(--border);
    padding: 1rem 1.25rem;
}

.table td {
    padding: 1rem 1.25rem;
    vertical-align: middle;
    border-bottom: 1px solid var(--border);
}

.table-hover tbody tr:hover {
    background-color: rgba(0, 0, 0, 0.02);
}

/* ================================
   Buttons
   ================================ */

.btn {
    font-weight: 500;
    border-radius: 8px;
    padding: 0.5rem 1rem;
    transition: all 0.2s ease;
}

.btn-primary {
    background: var(--brand-primary);
    border-color: var(--brand-primary);
}

.btn-primary:hover {
    background: var(--brand-accent);
    border-color: var(--brand-accent);
    transform: translateY(-1px);
}

.btn-outline-primary {
    color: var(--brand-primary);
    border-color: var(--brand-primary);
}

.btn-outline-primary:hover {
    background: var(--brand-primary);
    border-color: var(--brand-primary);
}

.btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
}

/* ================================
   Forms
   ================================ */

.form-control,
.form-select {
    border-radius: 8px;
    border: 1px solid var(--border);
    padding: 0.625rem 1rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 3px rgba(236, 104, 29, 0.1);
}

.form-label {
    font-weight: 500;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.input-group-text {
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: 8px;
}

/* ================================
   Badges
   ================================ */

.badge {
    font-weight: 500;
    padding: 0.35rem 0.65rem;
    border-radius: 6px;
}

/* ================================
   Alerts
   ================================ */

.alert {
    border: none;
    border-radius: 8px;
}

/* ================================
   Avatar
   ================================ */

.avatar {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

/* ================================
   Timeline
   ================================ */

.timeline {
    position: relative;
    padding: 1rem 0;
}

.timeline-item {
    display: flex;
    padding: 1rem 1.5rem;
    position: relative;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: 2.25rem;
    top: 2.5rem;
    bottom: 0;
    width: 2px;
    background: var(--border);
}

.timeline-item:last-child::before {
    display: none;
}

.timeline-marker {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--brand-primary);
    margin-right: 1rem;
    margin-top: 0.25rem;
    flex-shrink: 0;
}

.timeline-content {
    flex: 1;
}

/* ================================
   Responsive
   ================================ */

@media (max-width: 991.98px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.show {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }

    .sidebar-toggle {
        display: block;
    }
}

/* ================================
   Utilities
   ================================ */

.bg-primary {
    background-color: var(--brand-primary) !important;
}

.text-primary {
    color: var(--brand-primary) !important;
}

.text-gradient {
    background: linear-gradient(135deg, var(--gradient-start) 0%, var(--gradient-end) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
