:root {
    --sidebar-width: 280px;
    --sidebar-width-collapsed: 80px;
    --primary-color: #1a1c2e;
    --primary-dark: #16181f;
    --accent-color: #a80909;
    --accent-hover: #8a0707;
    --text-primary: #1a1c2e;
    --text-secondary: #6c757d;
    --border-color: #e9ecef;
    --bg-light: #f8f9fa;
    --bg-white: #ffffff;
    --shadow: rgba(0, 0, 0, 0.1);
    --shadow-hover: rgba(0, 0, 0, 0.15);
}

body {
    overflow-x: hidden;
}

.sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    background: linear-gradient(135deg, #1a1c2e 0%, #16181f 100%);
    transition: all 0.3s ease;
}

.sidebar.collapsed {
    width: var(--sidebar-width-collapsed);
}

.sidebar img {
    width: 40px;
    height: auto;
    transition: transform 0.3s;
    border-radius: 20px;
}

.sidebar-link {
    color: #a0a3bd;
    transition: all 0.2s ease;
    border-radius: 8px;
    margin: 4px 16px;
    white-space: nowrap;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar-link:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(5px);
}

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

.collapsed .hide-on-collapse {
    opacity: 0;
    visibility: hidden;
    display: none;
}

.hide-on-collapse {
    color: white;
    margin: 0;
}

.sidebar.collapsed .sidebar-link {
    justify-content: center;
    padding-left: 0.75rem !important;
    padding-right: 0.75rem !important;
}

.sidebar.collapsed .sidebar-link i {
    margin: 0 !important;
    width: 20px;
    text-align: center;
}

.main-content {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    padding: 20px;
    transition: all 0.3s ease;
    width: 100%;
}

.collapsed~.main-content {
    margin-left: var(--sidebar-width-collapsed);
}

.toggle-btn {
    position: absolute;
    right: -15px;
    top: 20px;
    background: white;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    border: none;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    z-index: 100;
    cursor: pointer;
    transition: transform 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toggle-btn:hover {
    transform: scale(1.1);
}

.toggle-btn i {
    color: #1a1c2e;
    font-size: 0.875rem;
    transition: transform 0.3s ease;
}

.sidebar.collapsed .toggle-btn i {
    transform: rotate(180deg);
}

.page-header {
    background: var(--primary-color);
    border-radius: 16px;
    padding: 2rem;
    color: white;
    box-shadow: 0 4px 12px var(--shadow);
}

.page-title {
    font-size: 2rem;
    font-weight: 700;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.page-title i {
    font-size: 1.75rem;
}

.page-subtitle {
    font-size: 1rem;
    opacity: 0.95;
    margin: 0.5rem 0 0 0;
}

.chamado-container {
    max-width: 900px;
    margin: 0 auto;
}

.chamado-card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 2px 8px var(--shadow);
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.chamado-card .card-body {
    padding: 30px;
}

.form-label {
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
}

.form-label i {
    color: var(--accent-color);
    font-size: 1rem;
}

.form-control {
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.form-control:focus {
    border-color: var(--accent-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(168, 9, 9, 0.1);
}

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

.btn {
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: var(--accent-color);
    border: none;
    color: white;
}

.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(168, 9, 9, 0.4);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

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

.btn-secondary:hover {
    background: var(--text-primary);
    transform: translateY(-2px);
}

.alert {
    border-radius: 8px;
    border: none;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

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

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

.alert i {
    font-size: 1.3rem;
}

.alert strong {
    font-weight: 600;
}

.text-danger {
    color: var(--accent-color) !important;
}

.text-muted {
    color: var(--text-secondary) !important;
}

/* Responsividade */
@media (max-width: 768px) {
    .main-content {
        margin-left: 0;
        padding: 15px;
    }

    .sidebar {
        transform: translateX(-100%);
    }

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

    .page-header {
        padding: 20px;
    }

    .page-title {
        font-size: 1.5rem;
    }

    .chamado-card .card-body {
        padding: 20px;
    }
}

/* Breakpoint tablet */
@media (max-width: 992px) {
    .page-header .header-content {
        gap: 12px;
    }
    .page-title {
        font-size: 1.6rem;
    }
}

/* Ajustes mobile mais robustos (sidebar, formulários e tabelas) */
@media (max-width: 576px) {
    .main-content {
        margin-left: 0 !important;
        padding: 12px;
    }

    .sidebar {
        transform: translateX(-100%);
    }

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

    .toggle-btn {
        right: -40px;
        top: 12px;
        width: 36px;
        height: 36px;
    }

    .page-header {
        padding: 14px;
        border-radius: 12px;
    }

    .page-title {
        font-size: 1.25rem;
        gap: 0.5rem;
    }

    .page-subtitle {
        font-size: 0.9rem;
    }

    .chamado-card .card-body {
        padding: 14px;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    .d-flex.justify-content-end.gap-2.mt-4 {
        flex-direction: column;
    }

    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

