/* File: css/style.css */

/* --- VARIABLES --- */
:root {
    --primary-dark: #363066;   /* Dark Text / Borders */
    --accent-color: #fa8232;   /* Highlight / Buttons */
    --bg-color: #F4F5F7;       /* Page Background */
    --card-bg: #FFFFFF;        /* Card Background */
    --text-grey: #666666;      /* Subtitles */
    --border-grey: #e0e0e0;    /* Inputs */
    --error-bg: #ffebee;       /* Error Alert Background */
    --error-text: #c62828;     /* Error Alert Text */
}

/* --- GLOBAL RESET --- */
* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
}

body {
    font-family: 'Bellota Text', cursive, sans-serif;
    background-color: var(--bg-color);
    color: var(--primary-dark);
    font-size: 16px;
    line-height: 1.5;
}

/* --- UTILITY CLASSES --- */
/* Flexbox Center (Used for Login Page) */
.flex-center {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

/* --- LOGIN CARD SPECIFIC --- */
.login-card {
    background: var(--card-bg);
    width: 100%;
    max-width: 420px;
    padding: 40px;
    border-radius: 6px;
    box-shadow: 0 10px 25px rgba(54, 48, 102, 0.1);
    border-top: 5px solid var(--primary-dark);
    position: relative;
}

.login-header {
    text-align: center;
    margin-bottom: 35px;
}

.login-header h2 {
    font-weight: 700;
    font-size: 28px;
    color: var(--primary-dark);
}

.login-header p {
    color: var(--text-grey);
    font-size: 15px;
    margin-top: 5px;
}

/* --- FORMS --- */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 700;
    font-size: 14px;
    color: var(--primary-dark);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-grey);
    border-radius: 4px;
    font-size: 16px;
    font-family: 'Bellota Text', sans-serif;
    color: #333;
    transition: all 0.3s;
    outline: none;
}

.form-control:focus {
    border-color: var(--primary-dark);
    box-shadow: 0 0 0 3px rgba(54, 48, 102, 0.1);
}

/* --- BUTTONS --- */
.btn-submit {
    display: inline-block;
    width: 100%;
    background-color: var(--accent-color);
    color: #fff;
    padding: 12px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    font-family: 'Bellota Text', sans-serif;
    transition: background 0.3s;
    text-align: center;
    text-decoration: none;
}

.btn-submit:hover {
    background-color: #e06d20; /* Slightly darker orange */
}

/* --- LINKS --- */
.forgot-link {
    display: block;
    text-align: center;
    margin-top: 20px;
    font-size: 14px;
    color: var(--text-grey);
    text-decoration: none;
    transition: color 0.3s;
}

.forgot-link:hover {
    color: var(--accent-color);
}

/* --- ALERTS --- */
.alert {
    padding: 12px;
    background: var(--error-bg);
    color: var(--error-text);
    border: 1px solid #ffcdd2;
    border-radius: 4px;
    margin-bottom: 20px;
    font-size: 14px;
    text-align: center;
}

/* --- RESPONSIVE MEDIA QUERIES --- */
@media (max-width: 480px) {
    /* Add breathing room on mobile screens so card doesn't touch edges */
    body {
        padding: 20px;
    }

    .login-card {
        padding: 25px 20px; /* Reduce internal padding on small screens */
    }

    .login-header h2 {
        font-size: 24px; /* Slightly smaller title */
    }
}

/* --- DASHBOARD LAYOUT --- */

/* Header Area */
.dashboard-header {
    background-color: #fff;
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 3px solid var(--primary-dark);
}

/* --- BRAND LOGO (FIXED FOR TRANSPARENCY) --- */
.logo-area {
    text-align: center;
    padding: 10px 0;
}

.brand-logo {
    /* Dimensions */
    width: 200px;
    height: 40px; 
    
    /* Crop the empty transparency from top/bottom */
    object-fit: cover;     
    object-position: center; 
    
    /* Layout */
    display: inline-block;
    max-width: 100%;
}

/* Optional: Hover effect */
.logo-area a:hover {
    opacity: 0.8;
}

.main-logo {
    height: 40px;   /* Match the height of your old placeholder */
    width: auto;    /* Maintain aspect ratio */
    display: block; 
    border: none;   /* Remove border-radius or borders if any */
}

.user-area {
    text-align: right;
}

.user-welcome {
    font-size: 14px;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 5px;
}

.user-links a {
    font-size: 12px;
    color: var(--text-grey);
    text-decoration: none;
    /*margin-left: 10px;*/
    transition: color 0.3s;
}

.user-links a:hover {
    color: var(--accent-color);
}

/* Horizontal Menu Bar */
.navbar {
    background-color: var(--primary-dark);
    padding: 0 30px;
}

.nav-list {
    list-style: none;
    display: flex;
}

.nav-list li a {
    display: block;
    padding: 15px 20px;
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    border-bottom: 3px solid transparent; /* Hidden underline */
    transition: all 0.3s;
}

.nav-list li a:hover, 
.nav-list li a.active {
    background-color: rgba(255,255,255,0.1);
    border-bottom-color: var(--accent-color);
}

/* Dashboard Content Grid */
.dashboard-container {
    padding: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 25px;
    color: var(--primary-dark);
    border-left: 6px solid var(--accent-color); /* Thicker accent bar */
    padding-left: 20px;
}

/* 3-Column Grid for Pie Charts */
.charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.chart-card {
    background: #fff;
    padding: 20px;
    border-radius: 6px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    text-align: center;
    border-top: 3px solid var(--border-grey);
}

.chart-card h3 {
    font-size: 16px;
    color: var(--primary-dark);
    margin-bottom: 15px;
    text-transform: uppercase;
}

/* --- DATA TABLES --- */
.table-container {
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    overflow-x: auto; /* Responsive scrolling */
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px; /* Ensures table doesn't squash too much */
}

.data-table thead {
    background-color: var(--primary-dark);
    color: #fff;
}

.data-table th, 
.data-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid var(--border-grey);
    font-size: 14px;
}

.data-table th {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.5px;
}

.data-table tbody tr:hover {
    background-color: #f9f9f9;
}

/* --- STATUS BADGES --- */
.badge {
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.badge-success {
    background-color: #e8f5e9;
    color: #2e7d32;
}

.badge-danger {
    background-color: #ffebee;
    color: #c62828;
}

/* --- ACTION BUTTONS --- */
.action-btn {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    text-decoration: none;
    font-weight: 600;
    margin-right: 5px;
    transition: background 0.3s;
}

.btn-edit {
    /*background-color: var(--bg-color);*/
    color: var(--primary-dark);
    border: 1px solid var(--border-grey);
}

.btn-edit:hover {
    background-color: #e0e0e0;
}

.btn-delete {
    background-color: #ffebee;
    color: #c62828;
    border: 1px solid #ffcdd2;
}

.btn-delete:hover {
    background-color: #ffcdd2;
}

/* Header Action Button (Add New) */
.header-actions {
    margin-bottom: 20px;
    text-align: right;
}

.btn-add {
    background-color: var(--accent-color);
    color: #fff;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 700;
    font-size: 14px;
    display: inline-block;
}

.btn-add:hover {
    background-color: #e06d20;
}

/* --- SPLIT LAYOUT (Form + Table) --- */
.split-container {
    display: grid;
    grid-template-columns: 1fr 2fr; /* Left takes 1 part, Right takes 2 parts */
    gap: 30px;
    align-items: start; /* Align tops of both columns */
}

/* Mobile: Stack them vertically */
@media (max-width: 900px) {
    .split-container {
        grid-template-columns: 1fr;
    }
}

/* --- FORM STYLES --- */
.form-card {
    background: #fff;
    padding: 25px;
    border-radius: 6px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    border-top: 3px solid var(--accent-color);
}

.form-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--border-grey);
    letter-spacing: 0.5px;
}

/* Small adjustments for inputs in the sidebar */
.form-card .form-group label {
    font-size: 12px;
	flex: 1;
    text-align: left;
}

.form-card .form-control {
    font-size: 14px;
    padding: 10px;
}

.btn-block {
    display: block;
    width: 100%;
    margin-top: 10px;
}

.btn-cancel {
    display: block;
    text-align: center;
    margin-top: 10px;
    color: var(--text-grey);
    font-size: 13px;
    text-decoration: none;
}
.btn-cancel:hover { text-decoration: underline; }

/* --- IMAGE PREVIEW GRID --- */
.image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 10px;
    margin-top: 15px;
    margin-bottom: 20px;
}

.img-thumb-container {
    position: relative;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 2px;
    background: #fff;
}

.img-thumb {
    width: 100%;
    height: 80px;         /* Keep the height fixed so the grid stays neat */
    object-fit: contain;  /* THIS IS THE KEY: Shows the full image without cropping */
    background-color: #e0e0e0; /* Grey background to show the frame */
    display: block;
    pointer-events: none;
}

.btn-delete-img {
    position: absolute;
    top: -5px;
    right: -5px;
    background: red;
    color: white;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 12px;
    cursor: pointer;
    line-height: 20px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}


/* Sort Input under images */
.sort-input {
    width: 100%;
    margin-top: 5px;
    padding: 2px 5px;
    border: 1px solid #ddd;
    border-radius: 3px;
    text-align: center;
    font-size: 12px;
}

/* Preview Item Container */
.preview-item {
    position: relative;
    display: inline-block;
    margin: 5px;
    border: 1px solid #ddd;
    padding: 2px;
    border-radius: 4px;
    background: #fff;
}

/* The Red X Button on Previews */
.btn-remove-preview {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #ff4444;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    text-align: center;
    line-height: 18px;
    font-size: 14px;
    cursor: pointer;
    border: 1px solid white;
    box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.btn-remove-preview:hover {
    background: #cc0000;
}


/* --- DATATABLES PAGINATION & SEARCH FIXES --- */

/* 1. Add breathing room inside the white box */
.dataTables_wrapper {
    padding: 20px; 
}

/* 2. Add space below the Search/Show Entries bars */
.dataTables_length, 
.dataTables_filter {
    margin-bottom: 25px; 
    color: var(--primary-dark);
    font-weight: 500;
}

/* 3. Style the Input Box and Dropdown (Padding & Vertical Center) */
.dataTables_wrapper input[type="search"], 
.dataTables_wrapper select {
    padding: 8px 12px;       /* Bigger internal space */
    margin: 0 15px;          /* Space to the left/right of the box */
    border: 1px solid #ccc;
    border-radius: 4px;
    outline: none;
    vertical-align: middle;  /* Perfect vertical centering */
    color: #555;
    background-color: #fff;
    height: 35px;            /* Fixed height for consistency */
    display: inline-block;
}

/* 4. Focus glow effect */
.dataTables_wrapper input[type="search"]:focus, 
.dataTables_wrapper select:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 5px rgba(250, 130, 50, 0.2);
}

/* 5. Fix Pagination spacing at bottom */
.dataTables_paginate {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

/* --- PROJECT FORM STYLES --- */

/* Scrollable Checkbox Areas */
.checkbox-list-container {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #ccc;
    padding: 10px;
    border-radius: 4px;
    background: #fff;
}

.checkbox-item {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid #eee;
}

.checkbox-item:last-child { border-bottom: none; margin-bottom: 0; }
.checkbox-item input { margin-right: 10px; transform: scale(1.2); }

/* Thumbnail Preview */
.thumb-preview {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border: 1px solid #ddd;
    padding: 3px;
    border-radius: 4px;
    margin-top: 5px;
}

/* Form Section Dividers */
.form-section-heading {
    margin-top: 30px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--accent-color);
    font-size: 18px;
    color: var(--primary-dark);
    font-weight: 700;
}

/* --- TOGGLE SWITCH (iOS Style) --- */
.switch-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #fff3e0; /* Light Orange Background for visibility area */
    padding: 15px 20px;
    border-radius: 6px;
    border: 1px solid #ffe0b2;
    margin-bottom: 25px;
}

.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
    margin-left: 15px;
}

.switch input { opacity: 0; width: 0; height: 0; }

.slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px; width: 18px;
    left: 4px; bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider { background-color: var(--accent-color); }
input:checked + .slider:before { transform: translateX(24px); }

/* --- NEW SECTION HEADINGS --- */
.form-section-heading {
    background-color: #f4f6f8; /* Light Grey Background */
    padding: 12px 20px;
    border-left: 5px solid var(--accent-color); /* Orange accent bar */
    border-radius: 4px;
    margin-top: 30px;
    margin-bottom: 20px;
    font-size: 18px;
    color: var(--primary-dark);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
}

#sortable-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 10px;
}

.ui-sortable-placeholder {
    border: 2px dashed #ccc;
    background: #f9f9f9;
    visibility: visible !important;
    height: 120px;
    width: 120px;
    border-radius: 4px;
}


.fa-facebook-f{
	color:#ffffff;
	background-color: #3b5998;
	width: 30px;
	height: 30px;
	border-radius: 50%;
}

.fa-instagram{
	color:#ffffff;
	background-color: #8a3ab9;
	width: 30px;
	height: 30px;
	border-radius: 50%;
}

.fa-linkedin-in{
	color:#ffffff;
	background-color: #0e76a8;
	width: 30px;
	height: 30px;
	border-radius: 50%;
}

.fa-x-twitter{
	color:#ffffff;
	background-color: #000000;
	width: 30px;
	height: 30px;
	border-radius: 50%;
}

.fa-youtube{
	color:#ffffff;
	background-color: #c4302b;
	width: 30px;
	height: 30px;
	border-radius: 50%;
}

.fa-pinterest-p{
	color:#ffffff;
	background-color: #c8232c;
	width: 30px;
	height: 30px;
	border-radius: 50%;
}

.fa-whatsapp{
	color:#ffffff;
	background-color: #00a33d;
	width: 30px;
	height: 30px;
	border-radius: 50%;
}

.fa-houzz{
	color:#ffffff;
	background-color: #4dbc15;
	width: 30px;
	height: 30px;
	border-radius: 50%;
}

.fa-behance{
	color:#ffffff;
	background-color: #000000;
	width: 30px;
	height: 30px;
	border-radius: 50%;
}


/* --- Slider Manager Styles --- */
.slider-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.slider-card {
    background: #fff;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    text-align: center;
    border: 1px solid #eee;
    position: relative;
    transition: transform 0.2s;
}

.slider-card:hover {
    box-shadow: 0 5px 15px rgba(0,0,0,0.15);
}

.slider-preview {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 4px;
    margin-bottom: 10px;
    background-color: #f0f0f0;
}

.slider-info {
    margin-bottom: 10px;
    font-size: 14px;
    color: #333;
    min-height: 40px; /* Keeps cards aligned even if text is empty */
}

.location-text {
    color: #666;
    font-size: 12px;
}

.drag-handle {
    cursor: move; 
    color: #888; 
    margin-bottom: 8px; 
    display: block;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Form Layout */
.form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 10px;
}
.full-width {
    width: 100%;
    margin-bottom: 15px;
}
.form-control-file {
    padding: 5px;
    border: 1px solid #ccc;
    width: 100%;
    box-sizing: border-box;
}
.rec-size {
    font-size: 12px; 
    color: #666; 
    display: block; 
    margin-top: 5px;
}
.separator-header {
    margin-top: 30px; 
    border-bottom: 1px solid #ccc; 
    padding-bottom: 5px; 
    color: #555;
}
.alert-success {
    background: #e8f5e9; 
    color: #2e7d32; 
    padding: 15px; 
    margin-bottom: 20px; 
    border-radius: 4px;
    border: 1px solid #c8e6c9;
}

.admin-split-layout {
	display: flex;
	gap: 20px;
	align-items: flex-start; /* Aligns items to top */
}

.left-panel {
	width: 350px; /* Fixed width for form */
	flex-shrink: 0;
	position: sticky; /* Keeps form in view while scrolling list */
	top: 20px;
}

.right-panel {
	flex-grow: 1; /* Takes remaining space */
	min-width: 0; /* Prevents flex overflow */
}

.table-img {
	width: 45px;
	height: 45px;
	border-radius: 50%;
	object-fit: cover;
	border: 2px solid #eee;
}
.designation-badge {
	background: #e3f2fd;
	color: #1565c0;
	padding: 2px 6px;
	border-radius: 4px;
	font-size: 10px;
	font-weight: bold;
	display: inline-block;
	margin-top: 2px;
}

/* Cropper Modal Styles */
.custom-modal {
    display: none; 
    position: fixed; 
    z-index: 9999; 
    left: 0; top: 0; width: 100%; height: 100%; 
    background-color: rgba(0,0,0,0.8);
}
.modal-content {
    background-color: #fff;
    margin: 5% auto;
    padding: 20px;
    width: 80%;
    max-width: 800px;
    border-radius: 8px;
}
.img-container {
    max-height: 500px;
    width: 100%;
}
#imageToCrop {
    max-width: 100%;
}







