/* Estilos base para o Sistema de Gestão */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
    overflow-x: hidden;
}

/* Layout Principal */
body {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 280px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    color: #2c3e50;
    padding: 20px;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border-radius: 0 15px 15px 0;
}

.sidebar-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 0;
    border-bottom: 2px solid #e0e0e0;
    margin-bottom: 30px;
}

.sidebar-header i {
    font-size: 2em;
    color: #667eea;
}

.sidebar-header span {
    font-size: 1.2em;
    font-weight: 600;
    color: #2c3e50;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px 0;
    border-bottom: 2px solid #e0e0e0;
    margin-bottom: 30px;
}

.user-avatar {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5em;
    color: white;
}

.user-details h4 {
    font-size: 1em;
    margin-bottom: 5px;
    color: #2c3e50;
}

.user-details p {
    font-size: 0.9em;
    color: #7f8c8d;
}

.sidebar-menu {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sidebar-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    border-radius: 10px;
    color: #2c3e50;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    border: 2px solid transparent;
}

.sidebar-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 0;
    background: rgba(102, 126, 234, 0.1);
    transition: width 0.3s ease;
}

.sidebar-item:hover::before {
    width: 100%;
}

.sidebar-item:hover {
    transform: translateX(5px);
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.05);
}

.sidebar-item i {
    font-size: 1.2em;
    z-index: 1;
    position: relative;
    color: #667eea;
}

.sidebar-item span {
    z-index: 1;
    position: relative;
    font-weight: 500;
    color: #2c3e50;
}

.sidebar-footer {
    padding: 20px 0;
    border-top: 2px solid #e0e0e0;
}

.logout-btn-sidebar {
    width: 100%;
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
    border: none;
    padding: 15px;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.logout-btn-sidebar:hover {
    background: linear-gradient(135deg, #c0392b 0%, #a93229 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(231, 76, 60, 0.3);
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 280px;
    transition: all 0.3s ease;
}

/* Top Bar */
.top-bar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 20px 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
    border-radius: 0 0 15px 15px;
    margin: 0 20px 20px 0;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5em;
    cursor: pointer;
    color: #667eea;
}

.page-title h1 {
    font-size: 2em;
    color: #2c3e50;
    margin-bottom: 5px;
}

.page-title p {
    color: #7f8c8d;
    font-size: 1em;
}

.top-bar-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.notifications {
    position: relative;
    cursor: pointer;
    padding: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.notifications:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

.notifications i {
    font-size: 1.2em;
    color: #667eea;
}

.notification-badge {
    position: absolute;
    top: 5px;
    right: 5px;
    background: #e74c3c;
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7em;
    font-weight: bold;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 10px;
    border-radius: 10px;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.user-menu:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.02);
}

.user-avatar-small {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

/* Dashboard Content */
.dashboard-content {
    padding: 30px;
    background: transparent;
    min-height: calc(100vh - 80px);
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.stat-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #667eea, #764ba2);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
    background: rgba(255, 255, 255, 1);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5em;
    color: white;
}

.stat-icon.pending {
    background: linear-gradient(135deg, #feca57 0%, #ff9ff3 100%);
}

.stat-icon.delivered {
    background: linear-gradient(135deg, #48dbfb 0%, #0abde3 100%);
}

.stat-icon.request {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
}

.stat-icon.users {
    background: linear-gradient(135deg, #26de81 0%, #20bf6b 100%);
}

.stat-info h3 {
    font-size: 2em;
    color: #2c3e50;
    margin-bottom: 5px;
}

.stat-info p {
    color: #7f8c8d;
    font-size: 0.9em;
}

/* Quick Actions */
.quick-actions {
    margin-bottom: 40px;
}

.quick-actions h2 {
    font-size: 1.5em;
    color: #2c3e50;
    margin-bottom: 20px;
}

.actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.action-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateX(-20px);
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.action-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--card-color), var(--card-color-light));
}

.action-card.request {
    --card-color: #ff6b6b;
    --card-color-light: #ee5a24;
}

.action-card.pending {
    --card-color: #feca57;
    --card-color-light: #ff9ff3;
}

.action-card.history {
    --card-color: #a55eea;
    --card-color-light: #8854d0;
}

.action-card.users {
    --card-color: #26de81;
    --card-color-light: #20bf6b;
}

.action-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
    background: rgba(255, 255, 255, 1);
}

.action-icon {
    width: 60px;
    height: 60px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5em;
    color: white;
    margin-bottom: 20px;
    background: linear-gradient(135deg, var(--card-color), var(--card-color-light));
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.action-card:hover .action-icon {
    transform: scale(1.1);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.action-card h3 {
    font-size: 1.2em;
    color: #2c3e50;
    margin-bottom: 8px;
}

.action-card p {
    color: #7f8c8d;
    font-size: 0.9em;
    line-height: 1.4;
}

/* Recent Activity */
.recent-activity h2 {
    font-size: 1.5em;
    color: #2c3e50;
    margin-bottom: 20px;
}

.activity-list {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px;
    border-bottom: 1px solid #f1f3f4;
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateX(-20px);
    position: relative;
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-item:hover {
    background: rgba(102, 126, 234, 0.05);
    transform: translateX(5px);
}

.activity-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, #667eea, #764ba2);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.activity-item:hover::before {
    opacity: 1;
}

.activity-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1em;
    color: white;
}

.activity-icon.delivered {
    background: linear-gradient(135deg, #48dbfb 0%, #0abde3 100%);
}

.activity-icon.pending {
    background: linear-gradient(135deg, #feca57 0%, #ff9ff3 100%);
}

.activity-icon.request {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
}

.activity-content h4 {
    font-size: 1em;
    color: #2c3e50;
    margin-bottom: 5px;
}

.activity-content p {
    color: #7f8c8d;
    font-size: 0.9em;
    margin-bottom: 5px;
}

.activity-time {
    color: #95a5a6;
    font-size: 0.8em;
}

/* Responsividade */
@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar-collapsed .sidebar {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .menu-toggle {
        display: block;
    }
}

@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .actions-grid {
        grid-template-columns: 1fr;
    }
    
    .top-bar {
        padding: 15px 20px;
    }
    
    .dashboard-content {
        padding: 20px;
    }
    
    .page-title h1 {
        font-size: 1.5em;
    }
    
    .stat-card {
        padding: 20px;
    }
    
    .action-card {
        padding: 20px;
    }
}



/* Formulários */
.form-container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 30px;
    margin: 20px auto;
    max-width: 600px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #2c3e50;
    font-weight: 600;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1em;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #3498db;
}

.btn {
    background: #3498db;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1em;
    transition: all 0.3s ease;
}

.btn:hover {
    background: #2980b9;
    transform: translateY(-2px);
}

.btn-danger {
    background: #e74c3c;
}

.btn-danger:hover {
    background: #c0392b;
}

.btn-success {
    background: #27ae60;
}

.btn-success:hover {
    background: #229954;
}

/* Tabelas */
.table-container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

th, td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

th {
    background: #f8f9fa;
    font-weight: 600;
    color: #2c3e50;
}

tr:hover {
    background: #f8f9fa;
}

/* Alertas */
.alert {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-danger {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Responsividade */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .header h1 {
        font-size: 2em;
    }
    
    .menu-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .menu-item {
        padding: 20px;
    }
    
    .logout-btn {
        position: static;
        margin: 10px auto;
        display: block;
        width: fit-content;
    }
    
    .form-container {
        margin: 10px;
        padding: 20px;
    }
    
    table {
        font-size: 0.9em;
    }
    
    th, td {
        padding: 8px;
    }
}

/* Loading spinner */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Back button */
.back-btn {
    background: #6c757d;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9em;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    margin-bottom: 20px;
}

.back-btn:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

/* Login Page */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.login-form {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 40px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 400px;
    text-align: center;
}

.login-form h2 {
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 1.8em;
}

.login-form p {
    color: #7f8c8d;
    margin-bottom: 30px;
    font-size: 1em;
}

.login-form .input-group {
    margin-bottom: 20px;
}

.login-form input[type="text"],
.login-form input[type="password"] {
    width: 100%;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1em;
    transition: border-color 0.3s ease;
}

.login-form input[type="text"]:focus,
.login-form input[type="password"]:focus {
    outline: none;
    border-color: #3498db;
}

.login-form input[type="submit"] {
    width: 100%;
    padding: 15px;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1em;
    cursor: pointer;
    transition: all 0.3s ease;
}

.login-form input[type="submit"]:hover {
    background: #2980b9;
    transform: translateY(-2px);
}

.btn-primary {
    background: #3498db;
}

.btn-primary:hover {
    background: #2980b9;
} 