/* ================================================= */
/*             Core Stylesheet (Layout)              */
/* ================================================= */

/* Font import */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600&display=swap');

/* Basic root variables that do NOT change with theme */
:root {
    --primary-font: 'Poppins', sans-serif;
    /* Color variables are defined in theme files */
}

/* Global Reset and Body Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--primary-font);
    background: var(--bg-gradient);
    color: var(--text-color);
    transition: background 0.4s ease, color 0.4s ease;
}

/* =================================== */
/*        Login Page Styles            */
/* =================================== */

.login-container {
    width: 400px;
    margin: 10% auto;
    padding: 40px;
    background: var(--card-bg);
    border-radius: 20px;
    border: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    transition: width 0.3s, margin 0.3s; /* Added for smooth transition */
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header h2 {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--heading-color);
}

.login-header p {
    font-size: 14px;
    color: var(--text-muted);
}

.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    font-size: 14px;
    margin-bottom: 8px;
    font-weight: 500;
}

.input-group input {
    width: 100%;
    padding: 12px 15px;
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-color);
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.input-group input::placeholder {
    color: var(--text-muted);
}

.input-group input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.btn-login {
    width: 100%;
    padding: 14px;
    background: var(--primary-color);
    border: none;
    border-radius: 8px;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
}

.btn-login:hover {
    background: var(--primary-hover-color);
}

/* Generic Success and Error Messages */
.success-message {
    background-color: rgba(76, 175, 80, 0.2);
    border: 1px solid var(--success-color, #4CAF50);
    color: var(--success-color, #4CAF50);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.error-message {
    background-color: rgba(244, 67, 54, 0.2);
    border: 1px solid var(--danger-color, #F44336);
    color: var(--danger-color, #F44336);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

/* ================================================= */
/*                 Profile Page Styles               */
/* ================================================= */

/* --- গ্লাস কার্ডের বেস স্টাইল --- */
.profile-page .card {
    background: rgba(42, 42, 62, 0.45);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 25px;
    box-sizing: border-box;
}

/* --- প্রোফাইল পেজের লেআউট (ডেস্কটপ-ফার্স্ট) --- */
.profile-page {
    display: flex;
    flex-direction: row; /* Default to row for desktop */
    align-items: flex-start;
    gap: 30px;
}

.profile-sidebar {
    flex: 0 0 380px; /* Fixed width for sidebar on desktop */
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.profile-main-content {
    flex: 1 1 auto;
    min-width: 0; /* Prevents content overflow */
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* --- সাইডবার কম্পোনেন্ট --- */
.profile-card {
    display: flex;
    flex-direction: row; /* Horizontal layout for desktop */
    align-items: center;
    text-align: left;
    gap: 20px; /* Increased gap */
    padding: 20px;
}

.profile-card__avatar {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.profile-card__name {
    font-size: 1.8rem;
    margin: 0;
}

.profile-card__role {
    color: var(--primary-color, #e91e63);
    margin: 4px 0 15px 0;
}

.profile-card__details p {
    font-size: 0.9rem;
    margin: 4px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr; /* Two columns for desktop stats */
    gap: 20px;
}

.stat-card {
    text-align: left;
    padding: 20px;
}

.stat-card p {
    margin: 0 0 8px 0;
    font-size: 0.9rem;
}

.stat-card strong {
    font-size: 2rem;
    font-weight: 600;
}

/* --- প্রধান কন্টেন্ট ব্লক --- */
.content-block__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-left: 5px;
}

.content-block__title {
    font-size: 1.2rem;
    margin-bottom: 0;
}

.btn-icon {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
}

.btn-icon:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.table-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}


/* ================================================= */
/*     Media Queries for Mobile Responsiveness       */
/* ================================================= */

@media (max-width: 1023px) { /* Tablet view */
    .profile-page {
        flex-direction: column; /* Stack sidebar and main content */
    }

    .profile-sidebar {
        flex: 0 0 auto; /* Allow sidebar to take auto width */
        width: 100%;
    }

    .profile-card {
        flex-direction: column; /* Stack avatar and info vertically */
        text-align: center;
    }
}

@media (max-width: 767px) { /* Mobile view */
    
    /* --- লগইন পেজের জন্য পরিবর্তন --- */
    .login-container {
        width: 90%; /* Use percentage for width */
        margin: 20% auto; /* Adjust vertical margin */
        padding: 25px;
    }
    
    .login-header h2 {
        font-size: 24px;
    }

    /* --- প্রোফাইল পেজের জন্য পরিবর্তন --- */
    .profile-page, .profile-sidebar, .profile-main-content {
        gap: 20px; /* Reduce gap on smaller screens */
    }

    .stats-grid {
        grid-template-columns: 1fr; /* Single column for stats */
    }

    .content-block__header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}