/* public/css/style.css - Main Stylesheet */

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

:root {
    --primary-color: #2ecc71;
    --secondary-color: #3498db;
    --danger-color: #e74c3c;
    --warning-color: #f39c12;
    --info-color: #2980b9;
    --dark-color: #2c3e50;
    --light-color: #ecf0f1;
    --border-radius: 8px;
    --transition: all 0.3s ease;
}

html, body {
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: #f5f7fa;
    color: #2c3e50;
}

/* Navbar */
.navbar {
    background-color: var(--dark-color);
    color: white;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.navbar-menu {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.user-info {
    font-size: 0.9rem;
}

.btn-logout {
    background-color: var(--danger-color);
    color: white;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    text-decoration: none;
    transition: var(--transition);
}

.btn-logout:hover {
    background-color: #c0392b;
    transform: translateY(-2px);
}

/* Layout */
.container-main {
    display: flex;
    height: calc(100vh - 70px);
}

.sidebar {
    width: 250px;
    background-color: white;
    border-right: 1px solid var(--light-color);
    overflow-y: auto;
    box-shadow: 2px 0 4px rgba(0,0,0,0.05);
}

.sidebar-content {
    padding: 1rem 0;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    color: #555;
    text-decoration: none;
    border-left: 3px solid transparent;
    transition: var(--transition);
}

.sidebar-link:hover {
    background-color: var(--light-color);
    border-left-color: var(--primary-color);
    color: var(--primary-color);
}

.sidebar-link i {
    width: 20px;
}

.content {
    flex: 1;
    overflow-y: auto;
    padding: 2rem;
}

/* Login Page */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
}

.login-container {
    width: 100%;
    max-width: 400px;
}

.login-box {
    background: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-header i {
    font-size: 3rem;
    color: var(--primary-color);
}

.login-header h1 {
    margin: 0.5rem 0 0.25rem;
    color: var(--dark-color);
}

.login-header p {
    color: #95a5a6;
    font-size: 0.9rem;
}

.login-form {
    margin-bottom: 1.5rem;
}

.login-footer {
    padding-top: 1.5rem;
    border-top: 1px solid var(--light-color);
    font-size: 0.85rem;
    color: #7f8c8d;
}

/* Dashboard */
.dashboard-header {
    margin-bottom: 2rem;
}

.dashboard-header h1 {
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    display: flex;
    align-items: center;
    gap: 1.5rem;
    transition: var(--transition);
}

.stat-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
    transform: translateY(-2px);
}

.stat-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(46, 204, 113, 0.1);
    border-radius: 50%;
}

.stat-content h3 {
    font-size: 1.8rem;
    color: var(--dark-color);
    margin-bottom: 0.25rem;
}

.stat-content p {
    color: #95a5a6;
    font-size: 0.9rem;
}

/* Alerts */
.section {
    background: white;
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    margin-bottom: 2rem;
}

.section h2 {
    color: var(--dark-color);
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
}

.alerts-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.alert-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    border-radius: var(--border-radius);
    border-left: 4px solid;
}

.alert-critical {
    background-color: rgba(231, 76, 60, 0.1);
    border-left-color: var(--danger-color);
}

.alert-warning {
    background-color: rgba(243, 156, 18, 0.1);
    border-left-color: var(--warning-color);
}

.alert-info {
    background-color: rgba(41, 128, 185, 0.1);
    border-left-color: var(--info-color);
}

.alert-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
    padding-top: 0.25rem;
}

.alert-critical .alert-icon { color: var(--danger-color); }
.alert-warning .alert-icon { color: var(--warning-color); }
.alert-info .alert-icon { color: var(--info-color); }

.alert-content p {
    margin: 0.25rem 0;
}

.alert-type {
    font-weight: bold;
    color: var(--dark-color);
}

.alert-message {
    color: #555;
    font-size: 0.95rem;
}

.alert-item small {
    color: #95a5a6;
    font-size: 0.85rem;
}

.no-data {
    text-align: center;
    color: #95a5a6;
    padding: 2rem;
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--dark-color);
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #bdc3c7;
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(46, 204, 113, 0.1);
}

/* Buttons */
.btn-primary,
.btn-secondary,
.btn-danger {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
    width: 100%;
}

.btn-primary:hover {
    background-color: #27ae60;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(46, 204, 113, 0.3);
}

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

.btn-secondary:hover {
    background-color: #2980b9;
}

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

.btn-danger:hover {
    background-color: #c0392b;
}

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
}

.alert-error {
    background-color: rgba(231, 76, 60, 0.1);
    color: var(--danger-color);
    border-left: 4px solid var(--danger-color);
}

.alert-success {
    background-color: rgba(46, 204, 113, 0.1);
    color: var(--primary-color);
    border-left: 4px solid var(--primary-color);
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        height: auto;
        border-right: none;
        border-bottom: 1px solid var(--light-color);
    }

    .container-main {
        flex-direction: column;
        height: auto;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .navbar {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .sidebar-content {
        display: flex;
        flex-wrap: wrap;
        padding: 1rem 0;
    }

    .sidebar-link {
        flex: 1 1 auto;
        min-width: 150px;
        border-left: none;
        border-bottom: 2px solid transparent;
    }

    .sidebar-link:hover {
        border-left: none;
        border-bottom-color: var(--primary-color);
    }
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--light-color);
}

::-webkit-scrollbar-thumb {
    background: #bdc3c7;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #95a5a6;
}
