/* =====================================================
   Shivaanshi Blogger Portal - Elegant Premium Theme
===================================================== */

* {
    box-sizing: border-box;
}

:root {
    --bg: #fbf7f4;
    --bg-soft: #fffaf7;
    --card: rgba(255, 255, 255, 0.88);
    --white: #ffffff;

    --primary: #3b2430;
    --primary-dark: #24141d;
    --primary-soft: #5a3546;

    --accent: #d9779b;
    --accent-dark: #be5f83;
    --gold: #c89b5c;

    --text: #2f2430;
    --muted: #7b6f78;
    --border: rgba(91, 65, 78, 0.12);

    --success-bg: #eaf7ef;
    --success-text: #207044;

    --error-bg: #fdecec;
    --error-text: #a33a3a;

    --warning-bg: #fff4dc;
    --warning-text: #9a6a18;

    --shadow: 0 18px 45px rgba(55, 35, 45, 0.10);
    --shadow-soft: 0 10px 25px rgba(55, 35, 45, 0.07);

    --radius: 24px;
    --radius-sm: 16px;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: "Segoe UI", Arial, Helvetica, sans-serif;
    background:
        radial-gradient(circle at top left, rgba(217,119,155,0.16), transparent 30%),
        radial-gradient(circle at bottom right, rgba(200,155,92,0.18), transparent 32%),
        linear-gradient(135deg, #fffaf7 0%, #f8eef2 45%, #fbf7f4 100%);
    color: var(--text);
    min-height: 100vh;
}

/* =====================================================
   App Layout
===================================================== */

.app {
    display: flex;
    min-height: 100vh;
}

/* =====================================================
   Sidebar
===================================================== */

.sidebar {
    width: 290px;
    background:
        linear-gradient(180deg, rgba(59,36,48,0.98), rgba(36,20,29,0.98)),
        radial-gradient(circle at top, rgba(217,119,155,0.35), transparent 40%);
    color: #fff;
    padding: 26px 20px;
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    overflow-y: auto;
    z-index: 10;
    box-shadow: 10px 0 35px rgba(36, 20, 29, 0.18);
}

.brand {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 8px 8px 26px;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.14);
}

.brand-logo {
    width: 54px;
    height: 54px;
    border-radius: 20px;
    background: linear-gradient(135deg, #d9779b, #c89b5c);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    font-weight: 800;
    box-shadow: 0 14px 30px rgba(217, 119, 155, 0.35);
}

.brand h2 {
    margin: 0;
    font-size: 22px;
    letter-spacing: 0.3px;
    line-height: 1.1;
    font-weight: 750;
}

.brand p {
    margin: 5px 0 0;
    font-size: 13px;
    color: rgba(255,255,255,0.72);
}

.sidebar nav {
    margin-top: 14px;
}

.sidebar nav a {
    display: flex;
    align-items: center;
    color: rgba(255,255,255,0.88);
    text-decoration: none;
    padding: 13px 15px;
    border-radius: 16px;
    margin-bottom: 9px;
    transition: all 0.22s ease;
    font-size: 15px;
    letter-spacing: 0.1px;
    border: 1px solid transparent;
}

.sidebar nav a:hover {
    background: rgba(255,255,255,0.10);
    color: #fff;
    transform: translateX(4px);
    border-color: rgba(255,255,255,0.08);
}

.sidebar nav a.active {
    background: linear-gradient(135deg, rgba(217,119,155,0.35), rgba(200,155,92,0.22));
    color: #fff;
    border-color: rgba(255,255,255,0.16);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.06);
}

.sidebar nav a.logout {
    margin-top: 20px;
    background: rgba(163,58,58,0.18);
    color: #ffd8d8;
}

.sidebar nav a.logout:hover {
    background: rgba(163,58,58,0.85);
    color: #fff;
}

/* =====================================================
   Main Content
===================================================== */

.main {
    margin-left: 290px;
    width: calc(100% - 290px);
    padding: 30px;
}

.topbar {
    background: rgba(255,255,255,0.76);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255,255,255,0.8);
    padding: 26px 28px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-soft);
    margin-bottom: 26px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.topbar h1 {
    margin: 0 0 7px;
    font-size: 30px;
    font-weight: 780;
    color: var(--primary);
    letter-spacing: -0.4px;
}

.topbar p {
    margin: 0;
    color: var(--muted);
    font-size: 15px;
}

/* =====================================================
   Dashboard Cards
===================================================== */

.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(235px, 1fr));
    gap: 22px;
    margin-bottom: 26px;
}

.card {
    background: var(--card);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    padding: 26px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid rgba(255,255,255,0.85);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at top right, rgba(217,119,155,0.16), transparent 34%),
        radial-gradient(circle at bottom left, rgba(200,155,92,0.12), transparent 35%);
    pointer-events: none;
}

.card h3 {
    position: relative;
    margin: 0 0 14px;
    color: var(--muted);
    font-size: 14px;
    font-weight: 650;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.card h2 {
    position: relative;
    margin: 0;
    font-size: 34px;
    font-weight: 800;
    color: var(--primary);
}

/* =====================================================
   Content Box
===================================================== */

.box {
    background: var(--card);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    padding: 26px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid rgba(255,255,255,0.85);
    overflow-x: auto;
}

.box h2 {
    margin-top: 0;
    color: var(--primary);
    letter-spacing: -0.2px;
}

/* =====================================================
   Tables
===================================================== */

.table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    min-width: 850px;
}

.table th {
    background: linear-gradient(135deg, var(--primary), var(--primary-soft));
    color: #fff;
    padding: 15px 15px;
    text-align: left;
    font-size: 13px;
    white-space: nowrap;
    letter-spacing: 0.4px;
    text-transform: uppercase;
}

.table th:first-child {
    border-top-left-radius: 16px;
}

.table th:last-child {
    border-top-right-radius: 16px;
}

.table td {
    padding: 15px;
    border-bottom: 1px solid var(--border);
    color: #493c45;
    font-size: 14px;
    vertical-align: top;
    white-space: nowrap;
    background: rgba(255,255,255,0.46);
}

.table tr:hover td {
    background: rgba(255, 250, 247, 0.92);
}

.table tr:last-child td {
    border-bottom: none;
}

/* =====================================================
   Forms
===================================================== */

.form {
    max-width: 560px;
}

.input,
select,
textarea {
    width: 100%;
    padding: 14px 15px;
    border: 1px solid rgba(91,65,78,0.18);
    border-radius: 15px;
    margin-bottom: 15px;
    font-size: 15px;
    background: rgba(255,255,255,0.86);
    outline: none;
    transition: 0.22s ease;
    color: var(--text);
}

.input:focus,
select:focus,
textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 5px rgba(217, 119, 155, 0.14);
    background: #fff;
}

textarea {
    min-height: 110px;
    resize: vertical;
}

/* =====================================================
   Buttons
===================================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary), var(--primary-soft));
    color: #fff;
    text-decoration: none;
    border: 0;
    padding: 13px 20px;
    border-radius: 15px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 700;
    transition: 0.22s ease;
    box-shadow: 0 10px 22px rgba(59,36,48,0.16);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 28px rgba(59,36,48,0.22);
}

.btn-accent {
    background: linear-gradient(135deg, var(--accent), var(--gold));
}

/* =====================================================
   Alerts
===================================================== */

.alert-error,
.alert-success,
.alert-warning {
    padding: 14px 16px;
    border-radius: 15px;
    margin-bottom: 17px;
    font-size: 14px;
    border: 1px solid transparent;
}

.alert-error {
    background: var(--error-bg);
    color: var(--error-text);
    border-color: rgba(163,58,58,0.12);
}

.alert-success {
    background: var(--success-bg);
    color: var(--success-text);
    border-color: rgba(32,112,68,0.12);
}

.alert-warning {
    background: var(--warning-bg);
    color: var(--warning-text);
    border-color: rgba(154,106,24,0.12);
}

/* =====================================================
   Login Page
===================================================== */

.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(circle at top left, rgba(217,119,155,0.22), transparent 30%),
        radial-gradient(circle at bottom right, rgba(200,155,92,0.24), transparent 32%),
        linear-gradient(135deg, #fffaf7 0%, #f7edf1 55%, #fffaf7 100%);
    padding: 20px;
}

.login-box {
    width: 430px;
    max-width: 100%;
    background: rgba(255,255,255,0.84);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    padding: 38px;
    border-radius: 30px;
    box-shadow: 0 25px 60px rgba(55,35,45,0.18);
    border: 1px solid rgba(255,255,255,0.86);
}

.login-box::before {
    content: "S";
    width: 64px;
    height: 64px;
    margin: 0 auto 18px;
    border-radius: 22px;
    background: linear-gradient(135deg, #d9779b, #c89b5c);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    font-weight: 850;
    box-shadow: 0 15px 32px rgba(217,119,155,0.36);
}

.login-box h2 {
    text-align: center;
    margin: 0 0 24px;
    font-size: 27px;
    color: var(--primary);
    letter-spacing: -0.3px;
}

.login-box .btn {
    width: 100%;
    margin-top: 4px;
}

/* =====================================================
   Badges
===================================================== */

.badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 11px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 750;
    background: #eee7ea;
    color: #57424d;
}

.badge-success {
    background: #eaf7ef;
    color: #207044;
}

.badge-warning {
    background: #fff4dc;
    color: #9a6a18;
}

.badge-danger {
    background: #fdecec;
    color: #a33a3a;
}

/* =====================================================
   Mobile Responsive
===================================================== */

@media (max-width: 920px) {
    .app {
        display: block;
    }

    .sidebar {
        position: relative;
        width: 100%;
        height: auto;
        padding: 20px;
        border-radius: 0 0 26px 26px;
    }

    .brand {
        padding-bottom: 18px;
    }

    .sidebar nav {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 9px;
    }

    .sidebar nav a {
        margin-bottom: 0;
        justify-content: center;
        text-align: center;
        font-size: 14px;
        padding: 12px 10px;
    }

    .main {
        margin-left: 0;
        width: 100%;
        padding: 18px;
    }

    .topbar {
        display: block;
        padding: 22px;
    }

    .topbar h1 {
        font-size: 25px;
    }

    .cards {
        grid-template-columns: 1fr;
    }

    .table {
        min-width: 780px;
    }
}
.text-muted {
    color: var(--muted);
    line-height: 1.7;
}

@media (max-width: 540px) {
    .sidebar nav {
        grid-template-columns: 1fr;
    }

    .login-box {
        padding: 30px 23px;
        border-radius: 24px;
    }

    .topbar h1 {
        font-size: 23px;
    }

    .card h2 {
        font-size: 30px;
    }

    .box {
        padding: 20px;
    }
}
