/* =========================
   Global CSS
========================= */

/* -------------------------
   Fonts Import
------------------------- */
@import url("https://fonts.googleapis.com/css2?family=Nunito:wght@200;300;400;500;600;700;800;900&family=Roboto:wght@300;400;500;700&family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap");

/* -------------------------
   Root Variables
------------------------- */
:root {
    /* Colors */
    --primary: #820b5c;
    --primary-light: #c074a4;
    --secondary: #1a0262;
    --secondary-light: #4b2b97;
    --accent: #5b21b6;
    --accent-solid: #4338ca;
    --success: rgb(0, 128, 43);
    --success-dark: rgb(0, 59, 20);
    --white: #ffffff;
    --light: #eeeeee;
    --black: #000000;
    --bg-light: #f8fafc;
    --light-blue: #e1f0ff;
    --card: #fff;
    --muted: #6b7280;
    --muted-2: #94a3b8;
    --gray: #f6f7fb;
    --light-gray: #f0f0f0;
    --dark-gray: #484b57;
    --light-blue: #ddeeff;
    --dark: #1a202c;
    --text-color: #4b5563;
    --border: #e6e9ee;
    --warning: #f59e0b;
    --warning-dark: #b45309;
    --danger: #ef4444;
    --danger-dark: #991b1b;
    --progress: #3b82f6;
    --active: linear-gradient(135deg, var(--secondary), var(--primary));

    /* Layout */
    --radius: 14px;
    --sradius: 8px;
    --shadow: 0 10px 30px rgba(15, 23, 42, 0.4), 0 4px 8px rgba(15, 23, 42, 0.1);
    --soft-shadow: 0 10px 20px rgba(15, 23, 42, 0.2);
}
/* -------------------------
   Reset & Base Styles
------------------------- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html,
body {
    min-height: 100%;
    font-family: "Nunito", "Roboto", "Poppins", sans-serif;
    background: var(--bg-color);
    color: var(--text-color);
    padding: 1rem;
}

h1,
h2,
h3,
h4,
h5,
h6,
p {
    margin: 0;
    padding: 0;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: 0.2s;
}

a:hover {
    color: var(--secondary);
}
.bg-primary {
    background-color: var(--primary) !important;
    border-color: var(--primary) !important;
}

.bg-secondary {
    background-color: var(--secondary) !important;
    border-color: var(--secondary) !important;
}
.text-primary {
    color: var(--primary) !important;
}
.text-secondary {
    color: var(--secondary) !important;
}
/* -------------------------
   Containers & Layout
------------------------- */
.container {
    margin: 0 auto;
    padding: 0 16px;
}

.full-width {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 1.25rem;
    margin: 0 auto 18px;
}

.section-title {
    font-size: 1.4rem;
    display: flex;
    font-weight: bold;
    padding: 1rem;
    margin: 1rem 0;
    text-align: start;
    max-width: 500px;
    border-radius: var(--sradius);
    color: var(--secondary);
    background: var(--light-blue);
    border-radius: 6px;
}

/* Flex & Grid Utilities */
.stats-row,
.activities-row,
.events-grid {
    display: flex;
    gap: 12px;
}

.grid-two-columns {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 12px;
    margin-top: 12px;
}

/* Responsive */
@media (max-width: 1100px) {
    .content,
    .grid-two-columns {
        grid-template-columns: 1fr;
    }
    .widgets-row {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .stats-row,
    .activities-row {
        flex-direction: column;
    }
    .widgets-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .events-grid {
        flex-direction: column;
    }
}

/* =========================
   Buttons Section
========================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 8px 12px;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: 0.25s ease;
}
.btn.primary {
    background: var(--primary);
    color: var(--white);
}
.btn.primary:hover {
    background: var(--secondary);
    color: var(--white);
}

.btn.secondary {
    background: var(--secondary);
    color: var(--white);
}
.btn.secondary:hover {
    background: var(--primary);
    color: var(--white);
}

.btn.success {
    background: var(--success);
    color: var(--white);
}
.btn.success:hover {
    background: var(--success-dark);
}

.btn.warning {
    background: var(--warning);
    color: var(--dark);
}
.btn.warning:hover {
    background: var(--warning-dark);
}
.btn.white-base {
    background: var(--white);
    color: var(--dark);
    border: 1px solid var(--border);
}
.btn.light:hover {
    background: var(--light-gray);
}
.btn.danger {
    background: var(--danger);
    color: var(--white);
}
.btn.danger:hover {
    background: var(--danger-dark);
}
.btn.gray {
    background: var(--gray);
    color: var(--dark);
}
.btn.gray:hover {
    background: var(--dark-gray);
    color: var(--white);
}
.btn-primary {
    background: var(--primary);
    color: var(--white);
}
.btn-primary:hover {
    background: var(--secondary);
    color: var(--white);
}

.btn-secondary {
    background: var(--secondary);
    color: var(--white);
}
.btn-secondary:hover {
    background: var(--primary);
    color: var(--white);
}

.btn-success {
    background: var(--success);
    color: var(--white);
}
.btn-success:hover {
    background: var(--success-dark);
}

.btn-warning {
    background: var(--warning);
    color: var(--dark);
}
.btn-warning:hover {
    background: var(--warning-dark);
}

.btn-light:hover {
    background: var(--light-gray);
}
.btn-danger {
    background: var(--danger);
    color: var(--white);
}
.btn-danger:hover {
    background: var(--danger-dark);
}
.btn-gray {
    background: var(--gray);
    color: var(--dark);
}
.btn-gray:hover {
    background: var(--dark-gray);
    color: var(--white);
}

/* -------------------------
   Forms
------------------------- */
input,
select,
textarea,
button {
    font-family: inherit;
    font-size: 1rem;
    outline: none;
}

input {
    border: 1px solid #ccc;
    border-radius: 6px;
    padding: 10px;
    width: 100%;
}

/* -------------------------
   Cards
------------------------- */
.card {
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--soft-shadow);
    padding: 8px;
    border: 1px solid var(--border);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.08), 0 3px 10px rgba(0, 0, 0, 0.04);
}

.gradient {
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    color: var(--white);
}
/* =========================
TABLE STYLING
========================= */
.table-wrapper {
    width: 100%;
    margin-bottom: 1.5rem;
}

/* Bootstrap-like styling */
.table-wrapper thead {
    background: #f1f5f9;
}

.table-wrapper th,
.table-wrapper td {
    padding: 0.9rem 1rem;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
    white-space: nowrap; /* prevents multi-line overflow */
}

.table-wrapper tr:hover {
    background-color: #f8fafc;
}

/* Profile images */
.table-wrapper img {
    width: 45px;
    height: 45px;
    object-fit: cover;
    border-radius: 50%;
}

/* Horizontal scroll ONLY on screens < 500px */
@media (max-width: 500px) {
    .table-wrapper {
        overflow-x: auto;
    }

    .table {
        width: 900px; /* expand table to enable scroll */
    }
}

.badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 0.25rem;
    text-align: center;
    white-space: nowrap;
}

/* -------------------------
   Text Utilities
------------------------- */
.sub-text {
    margin: 6px 0 0;
    color: var(--muted-2);
}

.sub-text-bold {
    margin-top: 8px;
    color: var(--muted-2);
    font-weight: 700;
}

/* -------------------------
   Animations
------------------------- */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.02);
    }
    100% {
        transform: scale(1);
    }
}
