/* admin/style.css */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --bg-body: #f8fafc;
    --sidebar-bg: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --card-bg: #ffffff;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
}

body {
    margin: 0;
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    display: flex;
    -webkit-font-smoothing: antialiased;
}

/* Sidebar Styles */
.sidebar {
    width: 260px;
    background-color: var(--sidebar-bg);
    height: 100vh;
    position: fixed;
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    z-index: 100;
}
.sidebar-header {
    padding: 25px;
    font-size: 22px;
    font-weight: 700;
    color: var(--primary);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 10px;
}
.nav-links {
    list-style: none;
    padding: 15px 10px;
    margin: 0;
    flex: 1;
}
.nav-links li {
    margin-bottom: 5px;
}
.nav-links li a {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.2s ease;
}
.nav-links li a:hover {
    background-color: #f1f5f9;
    color: var(--primary);
}
.nav-links li a.active {
    background-color: #eff6ff;
    color: var(--primary);
    font-weight: 600;
}
.sidebar-footer {
    padding: 20px;
    border-top: 1px solid var(--border-color);
}
.btn-logout {
    display: block;
    padding: 12px 15px;
    background: #fff;
    color: var(--danger);
    border: 1px solid #fecaca;
    border-radius: 8px;
    text-align: center;
    text-decoration: none;
    font-weight: 600;
    transition: 0.2s;
}
.btn-logout:hover {
    background: var(--danger);
    color: #fff;
    border-color: var(--danger);
}

/* Main Content Styles */
.main-content {
    margin-left: 260px;
    width: calc(100% - 260px);
    padding: 35px 40px;
    box-sizing: border-box; /* Ensures padding doesn't break the layout */
}

/* Layout Constraint - Left Aligned to remove the gap */
.container {
    width: 100%;
    max-width: 1400px; /* Increased from 1200px for better space utilization */
    margin: 0; /* Removes the center alignment that was causing the gap */
}

/* Header */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 35px;
}
.page-header h2 {
    margin: 0;
    font-size: 28px;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: -0.5px;
}
.user-info {
    background: #fff;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 500;
    font-size: 14px;
    color: var(--text-muted);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}
.stat-card {
    background: var(--card-bg);
    padding: 25px;
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    transition: transform 0.2s, box-shadow 0.2s;
}
.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}
.stat-title {
    font-size: 14px;
    color: var(--text-muted);
    font-weight: 600;
    margin-bottom: 15px;
}
.stat-value {
    font-size: 36px;
    font-weight: 700;
    color: var(--text-main);
    margin: 0;
}
.stat-icon {
    display: inline-block;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 18px;
    margin-bottom: 15px;
}
.stat-card.blue .stat-icon { background: #eff6ff; color: var(--primary); }
.stat-card.green .stat-icon { background: #ecfdf5; color: var(--success); }
.stat-card.orange .stat-icon { background: #fffbeb; color: var(--warning); }
.stat-card.red .stat-icon { background: #fef2f2; color: var(--danger); }

/* Table Styles */
.section-box {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 0;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    overflow: hidden;
}
.section-header {
    padding: 20px 25px;
    border-bottom: 1px solid var(--border-color);
    background: #fff;
}
.section-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
    color: var(--text-main);
}
table {
    width: 100%;
    border-collapse: collapse;
}
th, td {
    padding: 16px 25px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}
th {
    background: #f8fafc;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
td {
    font-size: 14px;
    color: var(--text-main);
}
tbody tr:hover {
    background-color: #f8fafc;
}

/* Badges */
.badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: capitalize;
}
.bg-success { background: #d1fae5; color: #065f46; }
.bg-danger { background: #fee2e2; color: #991b1b; }
.bg-warning { background: #fef3c7; color: #92400e; }
.bg-muted { background: #e2e8f0; color: #475569; }

/* Custom elements from other pages */
.msg { padding: 15px; border-radius: 8px; margin-bottom: 20px; font-weight: 500; }
.msg.success { background: #d1fae5; border-left: 4px solid var(--success); color: #065f46; }
.msg.error { background: #fee2e2; border-left: 4px solid var(--danger); color: #991b1b; }


/* --- Form Styles (Added for Create/Manage Pages) --- */
.form-section {
    padding: 30px;
}
.row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px;
}
.col {
    flex: 1;
    min-width: 250px;
}
.full-width {
    flex: 100%;
}
.form-group {
    display: flex;
    flex-direction: column;
}
.form-group label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 8px;
}
.form-group label span {
    color: var(--danger);
}
.form-control {
    padding: 12px 16px;
    background-color: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-main);
    font-size: 14px;
    font-family: inherit;
    transition: all 0.2s ease;
    box-sizing: border-box;
    width: 100%;
}
.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    background-color: #fff;
}
.btn {
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.btn-primary {
    background-color: var(--primary);
    color: #fff;
}
.btn-primary:hover {
    background-color: var(--primary-hover);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}
.btn-outline {
    background-color: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-main);
}
.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
    background-color: #f8fafc;
}
.btn-block {
    width: 100%;
}
hr.divider {
    border: 0;
    height: 1px;
    background: var(--border-color);
    margin: 30px 0;
}
.form-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}
.help-text {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 6px;
    font-style: italic;
}


/* --- Table Action Buttons & Badges (For Manage Licenses Page) --- */
.action-btn {
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    text-decoration: none;
    font-weight: 600;
    margin-right: 4px;
    transition: 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.btn-unblock { border: 1px solid var(--success); color: var(--success); background: #f0fdf4; }
.btn-unblock:hover { background: var(--success); color: white; }
.btn-block { border: 1px solid #f43f5e; color: #f43f5e; background: #fff1f2; }
.btn-block:hover { background: #f43f5e; color: white; }
.btn-suspend { border: 1px solid var(--warning); color: var(--warning); background: #fffbeb; }
.btn-suspend:hover { background: var(--warning); color: white; }
.btn-delete { border: 1px solid var(--text-muted); color: var(--text-muted); background: #f8fafc; }
.btn-delete:hover { border-color: var(--danger); background: var(--danger); color: white; }

.hwid-badge { background: #f1f5f9; padding: 4px 8px; border-radius: 6px; font-family: monospace; font-size: 12px; color: var(--primary); display: inline-block; word-break: break-all; max-width: 130px; border: 1px solid #e2e8f0; }
.hwid-unbound { color: #94a3b8; font-size: 12px; font-style: italic; }
.expiry-text { font-size: 13px; font-weight: 500; }
.expired { color: var(--danger); font-weight: bold; }

/* --- Action Group Container (To keep buttons inline) --- */
.action-group {
    display: flex;
    align-items: center;
    gap: 6px; /* বাটনগুলোর মাঝখানে ফাঁকা জায়গা */
    white-space: nowrap; /* কোনোভাবেই নিচে নামতে দেবে না */
}
table td.actions-col {
    white-space: nowrap;
    width: 1%; /* কলামটিকে যতটুকু দরকার ততটুকুই জায়গা নিতে বাধ্য করবে */
}



/* --- Login Page Specific Styles --- */
.login-body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: radial-gradient(circle at top left, #eef2ff, #f8fafc);
    margin: 0;
}
.login-card {
    width: 100%;
    max-width: 420px;
    background: #ffffff;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    border: 1px solid var(--border-color);
}
.login-header {
    text-align: center;
    margin-bottom: 35px;
}
.login-header .logo-icon {
    font-size: 40px;
    margin-bottom: 15px;
    display: inline-block;
}
.login-header h2 {
    font-size: 24px;
    font-weight: 700;
    margin: 0;
    color: var(--text-main);
}
.login-header p {
    color: var(--text-muted);
    font-size: 14px;
    margin-top: 8px;
}
.login-card .form-group {
    margin-bottom: 20px;
}
.login-footer {
    text-align: center;
    margin-top: 25px;
    font-size: 13px;
    color: var(--text-muted);
}