/* Design System for BIMDZ */
:root {
    --green: #006b3f;
    --green-light: #e8f5e9;
    --red: #d90429;
    --red-hover: #b0021c;
    --blue: #003241;
    --blue-hover: #004d63;
    --bg: #f8f7f4;
    --muted: #64748b;
    --white: #ffffff;
    --border: #e2e8f0;
    --radius: 16px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow: 0 10px 30px -10px rgba(0, 50, 65, 0.08), 0 1px 3px rgba(0, 50, 65, 0.02);
}

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

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg);
    color: var(--blue);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

/* Header */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 6%;
}

.brand {
    display: flex;
    gap: 12px;
    align-items: center;
}

.brand img {
    width: 48px;
    height: 48px;
    object-fit: contain;
    border-radius: 8px;
}

.brand b {
    display: block;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--blue);
}

.brand small {
    display: block;
    font-size: 12px;
    font-weight: 500;
    color: var(--green);
}

.nav {
    display: flex;
    gap: 20px;
    align-items: center;
}

.nav a {
    font-size: 15px;
    font-weight: 600;
    color: var(--blue);
    padding: 8px 12px;
    border-radius: 8px;
}

.nav a:hover {
    background: rgba(0, 50, 65, 0.05);
}

/* Buttons */
.btn, .pill, button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: var(--radius);
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    background: var(--blue);
    color: var(--white) !important;
}

.btn:hover, button:hover {
    background: var(--blue-hover);
    transform: translateY(-1px);
    color: var(--white) !important;
}

.pill {
    background: var(--green);
}

.pill:hover {
    background: #005230;
    color: var(--white) !important;
}

.btn.red, .pill.red {
    background: var(--red);
}

.btn.red:hover, .pill.red:hover {
    background: var(--red-hover);
    color: var(--white) !important;
}

.nav .pill {
    padding: 10px 20px;
    border-radius: 999px;
}

.btn.secondary {
    background: var(--green);
    color: var(--white) !important;
    border: 1px solid var(--green);
}

.btn.secondary:hover {
    background: #005230;
    border-color: #005230;
    transform: translateY(-1px);
}

.menu-btn {
    display: none;
}

/* Flash Messages */
.flash {
    margin: 20px 6% 0;
    padding: 16px 20px;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 15px;
    border: 1px solid transparent;
}

.flash.success {
    background: var(--green-light);
    color: var(--green);
    border-color: rgba(0, 107, 63, 0.15);
}

.flash.error {
    background: #fee2e2;
    color: var(--red);
    border-color: rgba(217, 4, 41, 0.15);
}

/* Hero Section */
.hero {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 60px;
    align-items: center;
    padding: 80px 6%;
}

.badge {
    display: inline-block;
    background: var(--green-light);
    color: var(--green);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 6px 14px;
    border-radius: 999px;
    margin-bottom: 20px;
}

h1 {
    font-size: clamp(36px, 5vw, 56px);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.03em;
    margin-bottom: 20px;
    color: var(--blue);
}

.lead {
    font-size: 18px;
    color: var(--muted);
    margin-bottom: 30px;
}

.actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.hero-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 28px;
    padding: 24px;
    box-shadow: var(--shadow);
}

.hero-card img {
    width: 100%;
    height: auto;
    border-radius: 16px;
}

.stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-top: 24px;
}

.stats div {
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 16px;
    text-align: center;
}

.stats div b {
    display: block;
    font-size: 24px;
    color: var(--blue);
}

.stats div span {
    font-size: 13px;
    color: var(--muted);
}

/* Sections */
.section {
    padding: 80px 6%;
}

.white {
    background: var(--white);
}

.dark {
    background: var(--blue);
    color: var(--white);
}

.title {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 50px;
}

.eyebrow {
    color: var(--green);
    font-size: 14px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 12px;
}

/* Grid Layouts */
.grid {
    display: grid;
    gap: 24px;
}

.three {
    grid-template-columns: repeat(3, 1fr);
}

.two {
    grid-template-columns: repeat(2, 1fr);
}

.card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 28px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px -15px rgba(0, 50, 65, 0.12);
}

.card h3 {
    margin-bottom: 12px;
    font-size: 20px;
    font-weight: 700;
}

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

/* Form Styles */
.form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-align: left;
}

.input-group label {
    font-size: 14px;
    font-weight: 600;
    color: var(--blue);
}

.form input, .form select, .form textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid var(--border);
    border-radius: 12px;
    font-family: inherit;
    font-size: 15px;
    color: var(--blue);
    background: var(--white);
    transition: var(--transition);
}

.form input::placeholder {
    color: #94a3b8;
}

.form input:focus, .form select:focus, .form textarea:focus {
    outline: none;
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(0, 50, 65, 0.08);
}

/* Auth Page Redesign */
.auth {
    max-width: 480px;
    margin: 60px auto;
    padding: 0 20px;
}

.auth-panel {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 40px;
    box-shadow: var(--shadow);
    text-align: center;
}

.auth-panel h1 {
    font-size: 28px !important;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 8px;
}

.subtitle {
    font-size: 14px;
    color: var(--muted);
    margin-bottom: 24px;
}

/* Google OAuth Button */
.btn-google {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    padding: 12px;
    background: var(--white);
    color: #374151;
    border: 1.5px solid var(--border);
    border-radius: 12px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: var(--transition);
}

.btn-google:hover {
    background: #f9fafb;
    border-color: #cbd5e1;
    transform: translateY(-1px);
}

.btn-google svg {
    flex-shrink: 0;
}

/* Divider "ou" */
.divider {
    position: relative;
    text-align: center;
    margin: 24px 0;
}

.divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--border);
    z-index: 1;
}

.divider span {
    position: relative;
    z-index: 2;
    background: var(--white);
    padding: 0 12px;
    color: var(--muted);
    font-size: 14px;
}

/* Submit Button */
.btn-submit {
    width: 100%;
    padding: 14px;
    background: var(--red);
    color: var(--white);
    border-radius: 12px;
    font-weight: 700;
    font-size: 16px;
    margin-top: 8px;
}

.btn-submit:hover {
    background: var(--red-hover);
}

.auth-footer {
    margin-top: 24px;
    font-size: 14px;
    color: var(--muted);
}

.auth-footer a {
    color: var(--blue);
    font-weight: 700;
}

.auth-footer a:hover {
    text-decoration: underline;
}

/* Locked Box & Dashboard */
.locked-box {
    max-width: 500px;
    margin: 80px auto;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 40px;
    text-align: center;
    box-shadow: var(--shadow);
}

.locked-box h1 {
    font-size: 28px;
    margin-bottom: 12px;
}

.locked-box p {
    color: var(--muted);
    margin-bottom: 24px;
}

/* Table styling for admin */
.table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.table th {
    background: #f8fafc;
    color: var(--blue);
    font-weight: 700;
    font-size: 14px;
    padding: 14px 16px;
    border-bottom: 2px solid var(--border);
    text-align: left;
}

.table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
}

.tag {
    display: inline-block;
    border-radius: 999px;
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 700;
    text-transform: capitalize;
}

.tag.pending {
    background: #fef3c7;
    color: #d97706;
}

.tag.approved {
    background: var(--green-light);
    color: var(--green);
}

.tag.locked {
    background: #fee2e2;
    color: var(--red);
}

/* Footer */
.footer {
    background: var(--white);
    padding: 40px 6%;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 24px;
}

.footer span {
    font-size: 14px;
    color: var(--muted);
}

.newsletter-mini {
    display: flex;
    gap: 12px;
}

.newsletter-mini input {
    padding: 10px 16px;
    border: 1.5px solid var(--border);
    border-radius: 12px;
    font-size: 14px;
}

.newsletter-mini button {
    padding: 10px 20px;
    border-radius: 12px;
}

/* Responsive Design */
@media (max-width: 900px) {
    .menu-btn {
        display: block;
        background: var(--blue);
        color: var(--white);
        padding: 8px 12px;
        border-radius: 8px;
    }
    
    .nav {
        display: none;
        position: absolute;
        top: 80px;
        left: 0;
        right: 0;
        background: var(--white);
        padding: 24px 6%;
        flex-direction: column;
        align-items: stretch;
        border-bottom: 1px solid var(--border);
        box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
    }
    
    .nav.open {
        display: flex;
    }
    
    .hero {
        grid-template-columns: 1fr;
        padding-top: 40px;
        gap: 40px;
        text-align: center;
    }
    
    .actions {
        justify-content: center;
    }
    
    .three, .two {
        grid-template-columns: 1fr;
    }
    
    .newsletter-mini {
        flex-direction: column;
        width: 100%;
    }
}

/* Publication Styling */
.pub-container {
    display: flex;
    flex-direction: column;
    gap: 30px;
    max-width: 800px;
    margin: 0 auto;
}

.pub-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 30px;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    gap: 16px;
    text-align: left;
}

.pub-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    color: var(--muted);
    border-bottom: 1px solid var(--border);
    padding-bottom: 12px;
}

.pub-author {
    font-weight: 700;
    color: var(--blue);
}

.pub-type-badge {
    text-transform: uppercase;
    font-weight: 800;
    font-size: 11px;
    letter-spacing: 0.05em;
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--green-light);
    color: var(--green);
}

.pub-card h2 {
    font-size: 24px;
    font-weight: 800;
    color: var(--blue);
}

.pub-content {
    font-size: 16px;
    color: #334155;
    line-height: 1.7;
    white-space: pre-wrap;
}

.pub-media-box {
    margin-top: 10px;
}

.pub-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    padding: 12px 0;
    margin-top: 10px;
}

.pub-action-left, .pub-action-right {
    display: flex;
    gap: 16px;
}

.action-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 8px;
    transition: var(--transition);
}

.action-btn:hover {
    background: #f1f5f9;
}

.action-btn.active {
    color: var(--red);
}

.action-btn.active-save {
    color: var(--blue);
}

.action-btn.delete-btn {
    color: var(--red);
}

.action-btn.delete-btn:hover {
    background: #fee2e2;
}

/* Comments Section */
.comments-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 10px;
}

.comments-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--blue);
}

.comments-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.comment-item {
    background: #f8fafc;
    border: 1px solid #f1f5f9;
    border-radius: 12px;
    padding: 12px 16px;
}

.comment-user {
    font-weight: 700;
    font-size: 13px;
    color: var(--blue);
    margin-bottom: 4px;
}

.comment-text {
    font-size: 14px;
    color: #475569;
}

.comment-date {
    font-size: 11px;
    color: var(--muted);
    margin-top: 4px;
    text-align: right;
}

.comment-form-box {
    margin-top: 8px;
}

.comment-form {
    display: flex;
    gap: 10px;
}

.comment-form input {
    flex-grow: 1;
    padding: 10px 14px;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    font-size: 14px;
}

.comment-form button {
    padding: 10px 16px;
    border-radius: 10px;
    font-size: 14px;
}

.premium-locked-notice {
    background: #f8fafc;
    border: 1px dashed var(--border);
    border-radius: 12px;
    padding: 14px;
    text-align: center;
    font-size: 14px;
    color: var(--muted);
}

.premium-locked-notice a {
    color: var(--blue);
    font-weight: 700;
}

.premium-locked-notice a:hover {
    text-decoration: underline;
}

/* Tabs System for Dashboard */
.tabs-header {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 30px;
    border-bottom: 1.5px solid var(--border);
    padding-bottom: 2px;
}

.tab-btn {
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 700;
    color: var(--muted);
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    transition: var(--transition);
    border-radius: 0;
}

.tab-btn:hover {
    color: var(--blue);
    background: none;
    transform: none;
}

.tab-btn.active {
    color: var(--blue);
    border-bottom-color: var(--green);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}
