/* ========================================================
   Smarter Skills CMS - Admin Panel Stylesheet
   ======================================================== */

:root {
    --admin-sidebar-bg: #091e1c;
    --admin-sidebar-hover: #123330;
    --admin-primary: #0f766e;
    --admin-primary-hover: #0d5f59;
    --admin-accent: #14b8a6;
    --admin-danger: #ef4444;
    --admin-success: #10b981;
    --admin-warning: #f59e0b;
    --admin-bg: #f1f5f9;
    --admin-card-bg: #ffffff;
    --admin-border: #e2e8f0;
    --admin-text-main: #0f172a;
    --admin-text-muted: #64748b;
    --admin-radius: 12px;
    --admin-shadow: 0 4px 16px rgba(15, 23, 42, 0.06);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--admin-bg);
    color: var(--admin-text-main);
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
}

/* ========================================================
   Admin Layout: Sidebar & Content Area
   ======================================================== */
.admin-wrapper {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.admin-sidebar {
    width: 270px;
    background: var(--admin-sidebar-bg);
    color: #f8fafc;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 100;
}

.sidebar-header {
    padding: 1.5rem 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.25rem;
    font-weight: 800;
}

.sidebar-brand-icon {
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, var(--admin-primary) 0%, var(--admin-accent) 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 1.1rem;
}

.sidebar-brand-text span {
    color: var(--admin-accent);
}

.sidebar-badge {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    background: rgba(20, 184, 166, 0.25);
    color: #5eead4;
    font-size: 0.7rem;
    font-weight: 700;
    border-radius: 4px;
    margin-left: 0.4rem;
}

.sidebar-menu {
    list-style: none;
    padding: 1.25rem 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    flex: 1;
    overflow-y: auto;
}

.menu-category {
    font-size: 0.72rem;
    text-transform: uppercase;
    color: #64748b;
    font-weight: 700;
    letter-spacing: 0.05em;
    padding: 0.65rem 0.75rem 0.25rem 0.75rem;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.7rem 0.95rem;
    color: #94a3b8;
    font-size: 0.92rem;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.sidebar-link i {
    font-size: 1.05rem;
    width: 20px;
}

.sidebar-link:hover,
.sidebar-link.active {
    background: var(--admin-sidebar-hover);
    color: #ffffff;
}

.sidebar-link.active {
    background: var(--admin-primary);
    color: #ffffff;
}

.sidebar-footer {
    padding: 1.25rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.user-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.user-name {
    font-size: 0.88rem;
    font-weight: 700;
    color: #ffffff;
}

.user-role {
    font-size: 0.75rem;
    color: #94a3b8;
}

.logout-btn {
    color: #ef4444;
    font-size: 1.1rem;
    padding: 0.4rem;
}

.logout-btn:hover {
    color: #f87171;
}

/* Main Content Area */
.admin-main {
    margin-left: 270px;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.admin-topbar {
    background: #ffffff;
    border-bottom: 1px solid var(--admin-border);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 50;
}

.topbar-title h1 {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--admin-text-main);
}

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

.admin-content {
    padding: 2rem;
    flex: 1;
}

/* Cards */
.admin-card {
    background: var(--admin-card-bg);
    border: 1px solid var(--admin-border);
    border-radius: var(--admin-radius);
    padding: 1.75rem;
    box-shadow: var(--admin-shadow);
    margin-bottom: 1.75rem;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 0.85rem;
    border-bottom: 1px solid var(--admin-border);
}

.card-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--admin-text-main);
    display: flex;
    align-items: center;
    gap: 0.55rem;
}

.card-title i {
    color: var(--admin-primary);
}

/* Stat Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: #ffffff;
    border: 1px solid var(--admin-border);
    border-radius: var(--admin-radius);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    box-shadow: var(--admin-shadow);
}

.stat-icon {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    background: rgba(15, 118, 110, 0.1);
    color: var(--admin-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.stat-details h3 {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--admin-text-main);
    line-height: 1.1;
}

.stat-details p {
    font-size: 0.85rem;
    color: var(--admin-text-muted);
    font-weight: 600;
}

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

.admin-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.admin-table th {
    background: #f8fafc;
    padding: 0.85rem 1rem;
    font-size: 0.82rem;
    text-transform: uppercase;
    color: var(--admin-text-muted);
    font-weight: 700;
    border-bottom: 2px solid var(--admin-border);
}

.admin-table td {
    padding: 1rem;
    font-size: 0.92rem;
    border-bottom: 1px solid var(--admin-border);
    color: var(--admin-text-main);
}

.admin-table tr:hover td {
    background: #f8fafc;
}

.badge-pill {
    display: inline-block;
    padding: 0.2rem 0.65rem;
    font-size: 0.78rem;
    font-weight: 700;
    border-radius: 9999px;
    text-transform: uppercase;
}

.badge-slider {
    background: #fef3c7;
    color: #92400e;
}

.badge-banner {
    background: #e0f2fe;
    color: #0369a1;
}

/* Buttons */
.btn-admin {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.6rem 1.25rem;
    font-size: 0.88rem;
    font-weight: 600;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-admin-primary {
    background: var(--admin-primary);
    color: #ffffff;
}

.btn-admin-primary:hover {
    background: var(--admin-primary-hover);
    color: #ffffff;
}

.btn-admin-secondary {
    background: #f1f5f9;
    color: var(--admin-text-main);
    border: 1px solid var(--admin-border);
}

.btn-admin-secondary:hover {
    background: #e2e8f0;
}

.btn-admin-danger {
    background: #fee2e2;
    color: #b91c1c;
    border: 1px solid #fca5a5;
}

.btn-admin-danger:hover {
    background: #ef4444;
    color: #ffffff;
}

.btn-sm {
    padding: 0.35rem 0.75rem;
    font-size: 0.8rem;
}

/* Forms */
.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--admin-text-main);
    margin-bottom: 0.45rem;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    font-family: inherit;
    color: var(--admin-text-main);
    background: #ffffff;
    border: 1px solid var(--admin-border);
    border-radius: 8px;
    transition: all 0.2s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--admin-primary);
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.15);
}

.form-text {
    font-size: 0.78rem;
    color: var(--admin-text-muted);
    margin-top: 0.3rem;
}

/* Dynamic Item Row (Slides, Images, Videos) */
.item-card {
    background: #f8fafc;
    border: 1px solid var(--admin-border);
    border-radius: 10px;
    padding: 1.25rem;
    margin-bottom: 1rem;
    position: relative;
}

.item-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.85rem;
}

.item-card-title {
    font-weight: 700;
    font-size: 0.92rem;
    color: var(--admin-primary);
}

/* Alerts */
.admin-alert {
    padding: 1rem 1.25rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.92rem;
    font-weight: 600;
}

.alert-success {
    background: #dcfce7;
    border: 1px solid #86efac;
    color: #166534;
}

.alert-error {
    background: #fee2e2;
    border: 1px solid #fca5a5;
    color: #991b1b;
}

/* Login Page Specific Styling */
.login-body {
    background: linear-gradient(135deg, #091e1c 0%, #0f3d38 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.login-card {
    background: #ffffff;
    border-radius: 16px;
    width: 100%;
    max-width: 440px;
    padding: 2.75rem 2.25rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-logo {
    width: 54px;
    height: 54px;
    margin: 0 auto 1rem auto;
    background: linear-gradient(135deg, var(--admin-primary) 0%, var(--admin-accent) 100%);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 1.6rem;
}

.login-title {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--admin-text-main);
}

.login-sub {
    font-size: 0.88rem;
    color: var(--admin-text-muted);
}
