/* 
   CT Ecoturismo Admin Stylesheet
*/

/* Admin Layout Structuring */
.admin-login-body {
    background: linear-gradient(135deg, #1b5e20 0%, #0f5132 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}

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

.login-card {
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 30px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.25);
}

.login-header {
    text-align: center;
    margin-bottom: 25px;
}

.login-logo {
    max-height: 70px;
    margin-bottom: 15px;
}

.login-header h2 {
    font-family: var(--font-heading);
    font-size: 20px;
    font-weight: 700;
    color: var(--primary-color);
}

.login-header p {
    color: var(--text-muted);
    font-size: 12px;
    margin-top: 5px;
}

.input-icon-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 15px;
    color: var(--text-muted);
}

.input-icon-wrapper input {
    padding-left: 42px;
}

.login-footer {
    text-align: center;
    margin-top: 25px;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
    font-size: 11px;
    color: var(--text-muted);
}

/* Administrative Screen Header & Topbar */
.admin-header {
    background-color: #1E293B;
    color: white;
    padding: 12px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.admin-logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.admin-logo img {
    height: 36px;
}

.admin-logo span {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 18px;
    letter-spacing: 0.5px;
}

.admin-user-info {
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.btn-logout {
    background-color: rgba(239, 68, 68, 0.1);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.2);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
}

.btn-logout:hover {
    background-color: #ef4444;
    color: white;
}

/* Sidebar and Main Layout */
.admin-layout {
    display: flex;
    flex: 1;
}

.admin-sidebar {
    width: 240px;
    background-color: #0F172A;
    border-right: 1px solid #1E293B;
    padding: 20px 0;
    flex-shrink: 0;
}

.admin-sidebar ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.admin-sidebar li a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: #94A3B8;
    font-weight: 500;
    font-size: 14px;
    border-left: 3px solid transparent;
}

.admin-sidebar li a:hover {
    background-color: #1E293B;
    color: white;
}

.admin-sidebar li a.active {
    background-color: #1E293B;
    color: white;
    border-left-color: var(--primary-color);
}

.admin-content {
    flex: 1;
    background-color: #F1F5F9;
    padding: 30px;
    overflow-y: auto;
}

/* Dashboard Metrics & Layout */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.dashboard-title h1 {
    font-family: var(--font-heading);
    font-size: 24px;
    font-weight: 800;
    color: var(--text-dark);
}

.dashboard-title p {
    color: var(--text-muted);
    font-size: 13px;
}

.dashboard-actions {
    display: flex;
    gap: 10px;
}

/* Dashboard grids */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 15px;
}

.stat-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.stat-card-info {
    display: flex;
    flex-direction: column;
}

.stat-card-num {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-dark);
    font-family: var(--font-heading);
}

.stat-card-label {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 500;
}

/* Panel component */
.panel {
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: var(--shadow);
    margin-bottom: 25px;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 15px;
    margin-bottom: 15px;
}

.panel-header h3 {
    font-family: var(--font-heading);
    font-size: 16px;
    font-weight: 700;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-link {
    font-size: 12px;
    font-weight: 600;
    color: var(--primary-color);
}

/* Tracking Rows */
.dashboard-rows-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 25px;
}

/* Tables styling */
.table-responsive {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    text-align: left;
}

.table th, 
.table td {
    padding: 12px 15px;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

.table th {
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--text-muted);
    background-color: #F8FAFC;
}

.table tbody tr:hover {
    background-color: #F8FAFC;
}

.empty-table {
    text-align: center;
    color: var(--text-muted);
    padding: 30px !important;
}

/* Progress indicator on Dashboard excursion cells */
.cred-progress-bar-container {
    width: 100px;
    height: 8px;
    background-color: #E2E8F0;
    border-radius: 4px;
    overflow: hidden;
    display: flex;
    position: relative;
}

.progress-bar {
    height: 100%;
}

.progress-anamnese {
    background-color: #1976D2;
}

.progress-termo {
    background-color: #2E7D32;
}

/* Badges */
.badge {
    display: inline-flex;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
}

.badge-success {
    background-color: #E8F5E9;
    color: #2E7D32;
}

.badge-danger {
    background-color: #FFEBEE;
    color: #C62828;
}

.badge-info {
    background-color: #E3F2FD;
    color: #1565C0;
}

/* Health alerts lists sidebar */
.health-alerts-list, 
.dashboard-logs-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.health-alert-item {
    display: flex;
    align-items: center;
    border-left: 3px solid #ef4444;
    background-color: #FFF5F5;
    padding: 10px 12px;
    border-radius: 4px;
    gap: 10px;
}

.health-alert-icon {
    color: #ef4444;
    font-size: 18px;
}

.health-alert-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.health-alert-name {
    font-weight: 600;
    font-size: 13px;
}

.health-alert-exc {
    font-size: 11px;
    color: var(--text-muted);
}

.btn-danger-link {
    color: #ef4444;
    font-size: 12px;
    font-weight: 600;
}

.btn-danger-link:hover {
    text-decoration: underline;
}

.dashboard-log-item {
    font-size: 12px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
}

.dashboard-log-item:last-child {
    border-bottom: none;
}

.log-item-meta {
    display: flex;
    justify-content: space-between;
    color: var(--text-muted);
    margin-bottom: 3px;
}

/* User search filter styling */
.filters-panel {
    margin-bottom: 20px;
}

.filters-form {
    width: 100%;
}

.filters-form .form-row {
    align-items: flex-end;
}

/* Icon box preview color Linktree */
.color-badge {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    display: inline-block;
    vertical-align: middle;
    margin-right: 5px;
    border: 1px solid #ccc;
}

/* Custom form inputs style in admin */
.admin-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Responsive side layouts */
@media (max-width: 900px) {
    .admin-layout {
        flex-direction: column;
    }
    .admin-sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #1E293B;
        padding: 6px 0;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .admin-sidebar ul {
        flex-direction: row;
        flex-wrap: nowrap;
        justify-content: flex-start;
        gap: 4px;
        padding: 0 15px;
        width: max-content;
    }
    .admin-sidebar li a {
        padding: 8px 16px;
        font-size: 13px;
        border-left: none;
        border-bottom: 3px solid transparent;
        white-space: nowrap;
    }
    .admin-sidebar li a.active {
        border-left-color: transparent;
        border-bottom-color: var(--primary-color);
    }
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    .dashboard-rows-grid {
        grid-template-columns: 1fr;
    }
    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
}
