
@import url('https://fonts.googleapis.com/css2?family=Figtree:ital,wght@0,300..900;1,300..900&family=Fjalla+One&family=Lato:ital,wght@0,100;0,300;0,400;0,700;0,900;1,100;1,300;1,400;1,700;1,900&family=Montserrat:ital,wght@0,100..900;1,100..900&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 {
    --bg: #ffffff;
    --bg-alt: #f5f5f5;
    --text: #222;
    --text-light: #555;
    --card: #ffffff;
    --border: #e5e5e5;
    --primary: #0077cc;
    --danger: #cc0000;
}

/* DARK MODE */
body.dark {
    --bg: #121212;
    --bg-alt: #1e1e1e;
    --text: #eaeaea;
    --text-light: #bbbbbb;
    --card: #1a1a1a;
    --border: #333;
    --primary: #4da3ff;
    --danger: #ff6b6b;
}


body {
    font-family: 'Montserrat', sans-serif;
    font-optical-sizing: auto;
    font-weight: 400;
    font-style: regular;
    background: var(--bg);
    color: var(--text);
}

/* ============================
   ADD PROJECT PAGE
============================ */

.admin-container {
    margin-left: 260px; /* matches sidebar offset */
    padding: 30px;
    max-width: 800px;
}

.admin-container h2 {
    font-size: 26px;
    font-weight: 600;
    margin-bottom: 25px;
    color: #333;
}

/* Success / error message */
.message {
    background: #e6ffe6;
    color: #1a7f1a;
    padding: 12px 15px;
    border-radius: 6px;
    border: 1px solid #b3ffb3;
    font-size: 14px;
    margin-bottom: 20px;
}

/* Form container */
.admin-form {
    background: #ffffff;
    padding: 25px 30px;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

/* Labels */
.admin-form label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    margin-top: 15px;
    color: #444;
}

/* Inputs, selects, textareas */
.admin-form input[type="text"],
.admin-form input[type="file"],
.admin-form select,
.admin-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 14px;
    background: #fff;
    transition: 0.25s ease;
    margin-bottom: 10px;
}

.admin-form input:focus,
.admin-form select:focus,
.admin-form textarea:focus {
    border-color: #4c4cff;
    box-shadow: 0 0 5px rgba(76,76,255,0.3);
    outline: none;
}

/* Save button */
.btn-save {
    margin-top: 20px;
    padding: 12px 20px;
    background: #4c4cff;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    cursor: pointer;
    transition: 0.25s ease;
}

.btn-save:hover {
    background: #3737ff;
}

/* Responsive */
@media (max-width: 700px) {
    .admin-container {
        margin-left: 0;
        padding: 20px;
    }

    .admin-form {
        padding: 20px;
    }
}



/* ================================
   TABLE (admin_projects.php)
================================ */

.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.admin-table th,
.admin-table td {
    padding: 14px;
    border-bottom: 1px solid #eee;
    text-align: left;
}

.admin-table th {
    background: var(--bg-alt);
    font-weight: 700;
}

.admin-table tr:hover {
    background: #fafafa;
}

.admin-table img {
    border-radius: 6px;
}

/* ================================
   LINKS
================================ */

.admin-table a {
    color: #0077cc;
    text-decoration: none;
    font-weight: 600;
}

.admin-table a:hover {
    text-decoration: underline;
}

.delete-link {
    display: inline-block;
    margin-top: 8px;
    color: var(--danger);
    font-weight: 600;
}

.delete-link:hover {
    text-decoration: underline;
}

/* ================================
   GALLERY GRID (admin_project_edit.php)
================================ */

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.gallery-item {
    background: #fafafa;
    padding: 12px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.gallery-item img {
    width: 100%;
    height: auto;
    border-radius: 6px;
    margin-bottom: 10px;
}

/* ================================
   RESPONSIVE
================================ */

@media (max-width: 768px) {
    .admin-container {
        padding: 20px;
    }

    .admin-table th,
    .admin-table td {
        padding: 10px;
    }
}

/* admin_sidebar */

.admin-sidebar {
    width: 220px;
    background: var(--bg-alt);
    padding: 25px 20px;
    border-right: 1px solid var(--border);
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
}

.sidebar-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 30px;
    color: var(--text);
}

.sidebar-link {
    display: block;
    padding: 10px 12px;
    margin-bottom: 12px;
    color: var(--text);
    text-decoration: none;
    border-radius: 6px;
    transition: background 0.2s;
}

.sidebar-link:hover {
    background: var(--primary);
    color: #fff;
}

.logout {
    color: var(--danger);
}



.admin-content {
    margin-left: 240px;
    padding: 40px 30px;
    background: var(--bg);
}



/* Dashboard CSS */

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.dash-card {
    background: var(--card);
    padding: 25px;
    border-radius: 10px;
    border: 1px solid var(--border);
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.dash-card h3 {
    margin-bottom: 10px;
}

.dash-card p {
    font-size: 28px;
    font-weight: 700;
}



/* ============================
   ADMIN SIDEBAR
============================ */

.admin-sidebar {
    width: 240px;
    height: 120vh;
    background: #1e1e2f;
    padding: 25px 20px;
    position: fixed;
    top: 0;
    left: 0;
    overflow-y: auto;
    box-shadow: 2px 0 10px rgba(0,0,0,0.2);
}

.sidebar-title {
    color: #fff;
    font-size: 22px;
    margin-bottom: 25px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Sidebar Links */
.sidebar-link {
    display: block;
    padding: 12px 15px;
    margin-bottom: 8px;
    color: #d1d1e0;
    text-decoration: none;
    font-size: 15px;
    border-radius: 6px;
    transition: 0.25s ease;
}

/* Hover Effect */
.sidebar-link:hover {
    background: #2c2c44;
    color: #fff;
    padding-left: 20px;
}

/* Active Link (optional: add class="active" in PHP) */
.sidebar-link.active {
    background: #4c4cff;
    color: #fff;
    font-weight: 600;
}

/* Logout Button */
.sidebar-link.logout {
    margin-top: 20px;
    background: #ff4c4c;
    color: #fff;
    font-weight: 600;
}

.sidebar-link.logout:hover {
    background: #e63939;
    padding-left: 20px;
}

/* Layout for content beside sidebar */
.admin-content {
    margin-left: 260px;
    padding: 30px;
}


/* ============================
   HEADER
============================ */

.admin-header {
    background: #ffffff;
    padding: 18px 30px;
    border-bottom: 1px solid #e5e5e5;
    margin-left: 260px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 50;
}

.admin-header h1 {
    margin: 0;
    font-size: 22px;
    font-weight: 600;
    color: #333;
}

.admin-header .header-right {
    font-size: 14px;
    color: #666;
}


/* ============================
   CONTENT AREA
============================ */

.admin-content {
    margin-left: 260px;
    padding: 30px;
}

.card {
    background: #fff;
    padding: 22px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    margin-bottom: 25px;
}


/* ============================
   TABLES
============================ */

table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

table th {
    background: #1e1e2f;
    color: #fff;
    padding: 12px;
    text-align: left;
    font-size: 14px;
}

table td {
    padding: 12px;
    border-bottom: 1px solid #eee;
    font-size: 14px;
}

table tr:hover td {
    background: #f1f1f7;
}


/* ============================
   FORMS
============================ */

form input,
form select,
form textarea {
    width: 100%;
    padding: 12px;
    margin-bottom: 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 14px;
    background: #fff;
}

form textarea {
    height: 120px;
    resize: vertical;
}

.form-box {
    max-width: 600px;
}


/* ============================
   BUTTONS
============================ */

button,
.btn-primary,
.btn {
    display: inline-block;
    padding: 10px 18px;
    background: #4c4cff;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: 0.25s ease;
    text-decoration: none;
}

button:hover,
.btn-primary:hover,
.btn:hover {
    background: #3737ff;
}

.btn-danger {
    background: #ff4c4c;
}

.btn-danger:hover {
    background: #e63939;
}


/* ============================
   FILTERS
============================ */

.filter-box {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.filter-box input,
.filter-box select {
    width: auto;
    min-width: 180px;
}


/* ============================
   PAGINATION
============================ */

.pagination {
    margin-top: 20px;
}

.pagination a {
    display: inline-block;
    padding: 8px 14px;
    margin-right: 5px;
    background: #ddd;
    color: #333;
    border-radius: 6px;
    text-decoration: none;
    transition: 0.25s ease;
}

.pagination a:hover {
    background: #bbb;
}

.pagination a.active {
    background: #4c4cff;
    color: #fff;
    font-weight: 600;
}


/* ============================
   RESPONSIVE
============================ */

@media (max-width: 900px) {
    .admin-header {
        margin-left: 200px;
    }
    .admin-content {
        margin-left: 220px;
    }
}

@media (max-width: 700px) {
    .admin-sidebar {
        position: relative;
        width: 100%;
        height: auto;
    }
    .admin-header {
        margin-left: 0;
    }
    .admin-content {
        margin-left: 0;
        padding: 20px;
    }
}


/* Admin_User_success_message */
.message {
    background: #e6ffe6;
    color: #1a7f1a;
    padding: 10px 15px;
    border-radius: 6px;
    margin-bottom: 15px;
    border: 1px solid #b3ffb3;
}
