/* OgaMedix Admin Reports & Analytics Page Styles */

/* Reports Container */
.reports-page {
    max-width: 1400px;
    margin: 0 auto;
}

.report-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.date-range-select {
    padding: 0.75rem 1.5rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.date-range-select:focus {
    outline: none;
    border-color: var(--primary-color);
}

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

.metric-card {
    background: var(--bg-primary);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border-color);
    display: flex;
    gap: 1rem;
    align-items: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.metric-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.metric-icon {
    font-size: 2.5rem;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 12px;
}

.metric-details {
    flex: 1;
}

.metric-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.metric-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.metric-trend {
    font-size: 0.85rem;
    font-weight: 600;
}

.metric-trend.positive {
    color: #10b981;
}

.metric-trend.negative {
    color: #ef4444;
}

/* Charts Section */
.charts-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.chart-container {
    background: var(--bg-primary);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border-color);
}

.chart-container.large {
    grid-column: 1 / -1;
}

.chart-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.chart-placeholder {
    min-height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Role Distribution Styles */
.role-stats {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.role-stat-item {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.role-name {
    min-width: 120px;
    font-weight: 600;
    color: var(--text-primary);
}

.role-bar {
    flex: 1;
    height: 24px;
    background: var(--bg-secondary);
    border-radius: 12px;
    overflow: hidden;
    position: relative;
}

.role-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 12px;
    transition: width 0.5s ease;
}

.role-count {
    min-width: 80px;
    text-align: right;
    font-weight: 600;
    color: var(--text-secondary);
}

/* Activity Bars */
.activity-bars {
    display: flex;
    align-items: flex-end;
    justify-content: space-around;
    height: 200px;
    gap: 0.5rem;
    padding: 1rem 0;
}

.activity-bar {
    flex: 1;
    background: linear-gradient(180deg, var(--primary-color), var(--secondary-color));
    border-radius: 6px 6px 0 0;
    min-height: 20px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.activity-bar:hover {
    opacity: 0.8;
    transform: scaleY(1.05);
}

.activity-labels {
    display: flex;
    justify-content: space-around;
    padding-top: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 600;
}

/* Reports Table */
.reports-table-section {
    background: var(--bg-primary);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border-color);
}

.reports-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.reports-table thead {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
}

.reports-table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.95rem;
}

.reports-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.9rem;
}

.reports-table tbody tr:hover {
    background-color: var(--bg-secondary);
}

/* Quick Stats Grid */
.quick-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.quick-stat {
    background: var(--bg-primary);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
}

.quick-stat:hover {
    border-color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(0, 180, 169, 0.15);
}

.quick-stat .stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.quick-stat .stat-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Old Profile Page Styles (keeping for backward compatibility) */
.profile-page {
    max-width: 1000px;
    margin: 0 auto;
}

/* Profile Header */
.profile-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 2rem;
    color: white;
    box-shadow: 0 4px 20px rgba(0, 180, 169, 0.2);
}

.profile-avatar-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.profile-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 4px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
}

.avatar-icon {
    font-size: 3rem;
}

.change-photo-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    padding: 0.5rem 1rem;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    font-weight: 500;
}

.change-photo-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
}

.profile-info {
    flex: 1;
}

.profile-name {
    font-size: 2.2rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
}

.profile-role {
    font-size: 1.2rem;
    margin: 0 0 0.25rem 0;
    opacity: 0.9;
    font-weight: 500;
}

.profile-department {
    font-size: 1rem;
    margin: 0;
    opacity: 0.8;
}

/* Profile Content */
.profile-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.profile-section {
    background: var(--bg-primary);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    padding: 2rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.section-subtitle {
    font-size: 1.4rem;
    color: var(--text-primary);
    margin: 0 0 1.5rem 0;
    font-weight: 600;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--border-light);
}

/* Profile Form */
.profile-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group input,
.form-group textarea {
    padding: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.3s ease;
    resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 180, 169, 0.1);
    background: var(--bg-primary);
}

.form-group input[readonly],
.form-group textarea[readonly] {
    background: var(--bg-tertiary);
    cursor: not-allowed;
    opacity: 0.8;
}

.form-group textarea {
    min-height: 100px;
    font-family: inherit;
    line-height: 1.5;
}

/* Profile Actions */
.profile-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.btn-primary,
.btn-secondary,
.btn-outline {
    padding: 1rem 2rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 180, 169, 0.3);
}

.btn-secondary {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 2px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--bg-tertiary);
    border-color: var(--primary-color);
}

.btn-outline {
    background: transparent;
    color: var(--text-secondary);
    border: 2px solid var(--border-color);
}

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

/* Edit Mode Styles */
.profile-form.edit-mode input:not([readonly]),
.profile-form.edit-mode textarea:not([readonly]) {
    background: var(--bg-primary);
    border-color: var(--primary-color);
}

.profile-form.edit-mode .form-group label {
    color: var(--primary-color);
}

/* Reports Responsive Design */
@media (max-width: 1024px) {
    .charts-section {
        grid-template-columns: 1fr;
    }

    .report-actions {
        flex-wrap: wrap;
    }
}

@media (max-width: 768px) {
    .metrics-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }

    .metric-card {
        flex-direction: column;
        text-align: center;
    }

    .metric-value {
        font-size: 1.5rem;
    }

    .page-header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }

    .report-actions {
        flex-direction: column;
    }

    .date-range-select,
    .btn-primary {
        width: 100%;
    }

    .reports-table-section {
        padding: 1rem;
        overflow-x: auto;
    }

    .quick-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .metrics-grid {
        grid-template-columns: 1fr;
    }

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

    .role-stat-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .role-name {
        min-width: auto;
    }

    .role-bar {
        width: 100%;
    }
}

/* Old Profile Responsive Design */
@media (max-width: 768px) {
    .profile-header {
        flex-direction: column;
        text-align: center;
        padding: 1.5rem;
    }

    .profile-avatar-section {
        order: -1;
    }

    .profile-name {
        font-size: 1.8rem;
    }

    .profile-role {
        font-size: 1.1rem;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .profile-section {
        padding: 1.5rem;
    }

    .profile-actions {
        flex-direction: column;
    }

    .btn-primary,
    .btn-secondary,
    .btn-outline {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .profile-header {
        padding: 1rem;
    }

    .profile-avatar {
        width: 100px;
        height: 100px;
    }

    .avatar-icon {
        font-size: 2.5rem;
    }

    .profile-name {
        font-size: 1.5rem;
    }

    .profile-section {
        padding: 1rem;
    }

    .section-subtitle {
        font-size: 1.2rem;
    }

    .form-group input,
    .form-group textarea {
        padding: 0.75rem;
        font-size: 0.9rem;
    }

    .btn-primary,
    .btn-secondary,
    .btn-outline {
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
    }
}

/* Animation for profile loading */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.profile-section {
    animation: fadeInUp 0.5s ease;
}

.profile-section:nth-child(1) {
    animation-delay: 0.1s;
}

.profile-section:nth-child(2) {
    animation-delay: 0.2s;
}

.profile-actions {
    animation: fadeInUp 0.5s ease 0.3s both;
}