/* General Styles */
body {
    font-family: Arial, Helvetica, sans-serif;
    background-color: #f6f8fa;
    margin: 0;
    padding: 0;
    color: #111827;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 20px auto;
}

a {
    color: #0ea5a4;
    text-decoration: none;
}
a:hover {
    text-decoration: underline;
}

/* Login Page */
.login-container {
    max-width: 400px;
    margin: 100px auto;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(20, 20, 20, 0.07);
    padding: 30px;
}
.login-container h2 {
    text-align: center;
    margin-top: 0;
    color: #374151;
}

/* Form Styles */
.form-group {
    margin-bottom: 18px;
}
.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: #374151;
}
.form-group input {
    width: 95%;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
}
.form-group input:focus {
    border-color: #0ea5a4;
    outline: none;
    box-shadow: 0 0 0 2px rgba(14, 165, 164, 0.2);
}
.alert {
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 15px;
    font-size: 14px;
}
.alert-danger {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}
.alert-success {
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}
.btn {
    width: 100%;
    padding: 12px 18px;
    background: linear-gradient(90deg, #0ea5a4, #7c3aed);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: opacity 0.3s;
    text-align: center;
    display: block;
    box-sizing: border-box; /* Ensures padding doesn't affect width */
}
.btn:hover {
    opacity: 0.9;
}

/* Dashboard Layout */
.header {
    background: #ffffff;
    padding: 15px 30px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(20, 20, 20, 0.04);
}
.header .logo {
    font-weight: 700;
    font-size: 20px;
    color: #111827;
}
.header .logo span {
    font-weight: 500;
    color: #6b7280;
}
.header .user-info a {
    color: #ef4444;
    font-weight: 600;
    font-size: 14px;
}

/* Stats Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}
.stat-card {
    background: #ffffff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(20, 20, 20, 0.06);
}
.stat-card h3 {
    margin-top: 0;
    font-size: 16px;
    color: #374151;
}
.stat-card .count {
    font-size: 32px;
    font-weight: 700;
    color: #0ea5a4;
}
.stat-card .count.failed {
    color: #ef4444;
}

/* Content Area */
.content-box {
    background: #ffffff;
    padding: 25px 30px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(20, 20, 20, 0.07);
    margin-top: 20px;
}

/* Email Preview */
.preview-frame {
    width: 100%;
    height: 600px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: #f9fafb;
}

/* Table */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}
table th, table td {
    padding: 12px;
    border-bottom: 1px solid #e5e7eb;
    text-align: left;
    font-size: 14px;
}
table th {
    background: #f9fafb;
    font-weight: 600;
    color: #374151;
}
table tr:last-child td {
    border-bottom: none;
}
.status-sent {
    color: #166534;
    font-weight: 600;
}
.status-failed {
    color: #991b1b;
    font-weight: 600;

/* ============================================
=== অ্যাডমিন প্যানেল নিওন ডিজাইন (নতুন কোড) ===
============================================
*/

/* সব অ্যাডমিন পেজের জন্য ডার্ক বডি */
body.admin-panel {
    background-color: #0f172a; /* ডার্ক ব্লু-গ্রে */
    color: #e2e8f0;
    margin: 0;
    padding: 0;
    font-family: 'Inter', sans-serif;
}

/* --- সাইডবার (ডেস্কটপ মেনু) --- */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 250px;
    background-color: #0c1322; /* আরও ডার্ক */
    border-right: 1px solid #1e293b;
    display: flex;
    flex-direction: column;
    z-index: 100;
}
.sidebar-header {
    padding: 24px 20px;
    border-bottom: 1px solid #1e293b;
}
.sidebar-logo {
    font-size: 24px;
    font-weight: 700;
    color: #fff;
    text-decoration: none;
}
.sidebar-logo span {
    opacity: 0.7;
}
.sidebar-nav {
    flex: 1; /* মেনুকে বড় করে */
    padding: 20px 0;
}
.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    margin: 4px 10px;
    font-size: 15px;
    font-weight: 600;
    color: #94a3b8; /* হালকা গ্রে */
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.3s ease;
}
.sidebar-nav a:hover {
    background-color: #1e293b;
    color: #fff;
}
/* বর্তমান পেজের জন্য অ্যাক্টিভ স্টাইল */
.sidebar-nav a.active {
    background: linear-gradient(90deg, #0ea5a4, #7c3aed);
    color: #fff;
    box-shadow: 0 4px 10px rgba(124, 58, 237, 0.3);
}
.sidebar-footer {
    padding: 20px;
    border-top: 1px solid #1e293b;
}
.sidebar-footer a {
    display: block;
    text-align: center;
    padding: 10px;
    background: #1e293b;
    color: #e2e8f0;
    font-weight: 600;
    border-radius: 6px;
    text-decoration: none;
    transition: background-color 0.3s ease;
}
.sidebar-footer a:hover {
    background: #334155;
}

/* --- মোবাইল হেডার --- */
.mobile-header {
    display: none; /* ডিফল্টভাবে হাইড */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: #0c1322;
    border-bottom: 1px solid #1e293b;
    padding: 15px 20px;
    z-index: 101;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.mobile-header .logo {
    font-size: 20px;
    font-weight: 700;
    color: #fff;
    text-decoration: none;
}
.mobile-header .logo span { opacity: 0.7; }

/* হ্যামবার্গার বাটন */
#menu-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}
#menu-toggle span {
    display: block;
    width: 24px;
    height: 3px;
    background-color: #fff;
    margin: 5px 0;
    transition: all 0.3s ease;
}
#menu-toggle.open span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}
#menu-toggle.open span:nth-child(2) {
    opacity: 0;
}
#menu-toggle.open span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* --- মূল কন্টেন্ট এরিয়া --- */
.main-content {
    margin-left: 250px; /* সাইডবারের প্রস্থ */
    padding: 30px;
}
.main-content h1 {
    font-size: 28px;
    font-weight: 700;
    color: #fff;
    margin-top: 0;
    margin-bottom: 25px;
}

/* নিওন স্ট্যাটেস্টিক কার্ড */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}
.stat-card {
    background-color: #0c1322;
    border: 1px solid #1e293b;
    border-radius: 8px;
    padding: 20px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0,0,0, 0.2);
}
.stat-card:hover {
    border-color: #7c3aed;
    transform: translateY(-5px);
}
.stat-card h3 {
    margin-top: 0;
    font-size: 16px;
    color: #94a3b8;
    margin-bottom: 10px;
}
.stat-card .count {
    font-size: 36px;
    font-weight: 700;
    color: #fff;
}
.stat-card .count.sent { color: #0ea5a4; }
.stat-card .count.failed { color: #f43f5e; /* নিওন রেড */ }

/* কন্টেন্ট বক্স (টেবিল / ফর্ম) */
.content-box {
    background-color: #0c1322;
    border: 1px solid #1e293b;
    border-radius: 8px;
    padding: 25px 30px;
    box-shadow: 0 4px 10px rgba(0,0,0, 0.2);
}
.content-box h2 {
    font-size: 20px;
    font-weight: 600;
    color: #fff;
    margin-top: 0;
    border-bottom: 1px solid #1e293b;
    padding-bottom: 15px;
    margin-bottom: 20px;
}

/* নিওন টেবিল ডিজাইন */
.table-wrapper {
    overflow-x: auto;
}
table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
}
table th, table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #1e293b;
    color: #e2e8f0;
    font-size: 14px;
}
table th {
    color: #94a3b8;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
table tr:hover {
    background-color: #1e293b;
}
table .status-sent {
    color: #0ea5a4;
    font-weight: 600;
}
table .status-failed {
    color: #f43f5e;
    font-weight: 600;
}

/* নিওন ফর্ম ডিজাইন */
.form-group label {
    color: #94a3b8;
    font-weight: 600;
}
.form-group input {
    background-color: #0f172a;
    border: 1px solid #334155;
    color: #fff;
}
.form-group input:focus {
    border-color: #7c3aed;
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.3);
}
.btn { /* বাটন রি-স্টাইল করা */
    background: linear-gradient(90deg, #0ea5a4, #7c3aed);
}

/* --- রেসপন্সিভ ডিজাইন --- */
@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%); /* সাইডবার হাইড করা */
        transition: transform 0.3s ease;
    }
    .sidebar.open {
        transform: translateX(0);
        box-shadow: 0 0 50px rgba(0,0,0, 0.5);
    }
    .mobile-header {
        display: flex; /* মোবাইল হেডার দেখানো */
    }
    .main-content {
        margin-left: 0; /* ফুল উইডথ */
        padding-top: 100px; /* মোবাইল হেডারের জন্য জায়গা */
    }
}

/* মোবাইল মেনু খোলা থাকলে মেইন কন্টেন্টে ক্লিক ব্লক করা */
.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.4);
    z-index: 99;
}
.overlay.open {
    display: block;
}