/* ==========================================================================
   SECTION A: DESIGN SYSTEM VARIABLE REGISTRY
   ========================================================================== */
:root {
    --bg-light: #f4f6f9;        
    --primary: #a8841f;         /* Elegant Olive-Gold */
    --secondary: #8d6c1c;
    --dark: #0f141c;
    --text: #2f3b4d;
    --text-muted: #94a3b8;      /* Clean muted grey */
    --card-bg: #ffffff;
    --card-radius: 16px;        /* Smooth, soft layout corners */
    --transition-base: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --error-color: #ef4444;
    --darker-red: #a10b0b;
    --border-color: #e2e8f0;
    --darkgrey: #444752;
    --emerald: #10b981;

    /* 🆕 Added for shared dropdown/navigator components (matches ClientFollowUp_style.css) */
    --border-clr: var(--border-color);
    --hover-gold: var(--primary);
    --accent-clr: var(--secondary);
    
    /* Image Accent Markers */
    --status-blue-bg: #f0f7ff;  --status-blue-text: #3b82f6;
    --status-gold-bg: #fef8e7;  --status-gold-text: #b3922e;
    --status-red-bg: #fff5f5;   --status-red-text: #ef4444;
    --status-green-bg: #f0fdf4; --status-green-text: #22c55e;
}

/*tooltip hover*/
.tooltip-hover:hover::before {
    position: fixed;
    top: calc(var(--tooltip-y, 0px) + 24px);
    left: calc(var(--tooltip-x, 0px) + -18px);
    font-size: 0.7rem;
    padding: 1px 5px;
    background-color: #3b3b3b;
    color: white;
    content: attr(tooltip-msg);
    border-radius: 5px;
    white-space: nowrap;
    pointer-events: none;
    z-index: 50;
}
.svg-darkgrey { fill: var(--darkgrey); }
.svg-gold { fill: var(--primary); }
.svg-red { fill: var(--error-color); }
.svg-darker-red { fill: var(--darker-red); }
.svg-green { fill: var(--emerald); }
.svg-emerald { fill: var(--status-green-text); }

/* Document Resets ensuring clean layout continuity without clipping */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    height: auto;
    min-height: 100%;
    overflow-x: hidden;         /* Remove horizontal broken canvas overflows */
    overflow-y: auto;  
    background-color: rgb(250 239 210 / 0.5);
         /* Strictly hand off all scroll mechanics to main screen viewport */
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--bg-light);
    color: var(--text);
    -webkit-font-smoothing: antialiased;

}

/* ==========================================================================
   SECTION B: PLATFORM WRAPPERS & DASHBOARD LAYOUTS
   ========================================================================== */
.admin-page-container {
    font-family: 'Inter', sans-serif;
    background-color: rgb(250 239 210 / 0.5);
    height: auto;
    min-height: 100%;
    overflow-x: hidden;
    overflow-y: auto; 
}

/* Auth Popup Container Box */

.admin-panel-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: clamp(1.25rem, 4vw, 2.5rem);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05);
    width: min(92%, 440px);
    margin: clamp(1.5rem, 6vh, 4rem) auto;
}

.admin-dashboard-layout {
    width: 100%;
    height: auto;
    overflow: visible;
    padding: clamp(1rem, 3vw, 2rem) 0;
}

.dashboard-header-inline {
    display: flex;
    flex-wrap: wrap;              /* lets content wrap naturally instead of a hard breakpoint */
    align-items: center;
    justify-content: space-between;
    gap: clamp(0.5rem, 2vw, 2rem);
    position: sticky;             /* sticky instead of fixed: height can vary as it wraps, no overlap risk */
    top: 0;
    width: 100%;
    z-index: 40;
    background: linear-gradient(135deg, #171310 0%, #2c2013 55%, #866e1e 100%);
    padding: clamp(0.5rem, 1.5vw, 1rem) clamp(1rem, 4vw, 3rem);
    border-bottom: 1px solid rgb(226 232 240 / var(--tw-border-opacity, 1));
}

.panel-title-large {
    font-size: clamp(1.15rem, 1.5vw + 0.8rem, 1.5rem);
    font-weight: 700;
    color: rgb(222 175 55 / var(--tw-text-opacity, 1));
    letter-spacing: -0.025em;
}

.subheadertext-class {
    font-size: clamp(0.75rem, 0.5vw + 0.65rem, 0.875rem);
    font-weight: 500;
    color: rgb(212 207 197 / var(--tw-text-opacity, 1));
}

/* ==========================================================================
   SECTION C: COMPONENT NODES
   ========================================================================== */
/* Metrics Row Framework */
.metrics-dashboard-grid {
    padding: clamp(0.75rem, 2vw, 1rem);
	padding-top: 6em;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
    gap: clamp(0.75rem, 2vw, 1rem);
}

.metric-card-item {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--card-radius);
    padding: clamp(1rem, 2.5vw, 1.5rem);
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
}

.metric-text-block {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.metric-counter-number {
    font-size: clamp(1.4rem, 1.5vw + 1rem, 2rem);
    font-weight: 700;
    color: var(--dark);
    line-height: 1;
}

.metric-label-title {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 0.5px;
}
.metric-label {
    font-size: clamp(1.15rem, 1.5vw + 0.85rem, 2rem);
    font-weight: 700;
    color: var(--text);
    letter-spacing: 0.5px;
    max-width: 100%;
}

/* Square Accent Micro-Containers for Icons */
.metric-icon-square {
    width: clamp(36px, 4vw, 44px);
    height: clamp(36px, 4vw, 44px);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.metric-icon-square .icon-glyph { font-size: 1.2rem; }
.status-blue  { background-color: var(--status-blue-bg);  color: var(--status-blue-text); }
.status-gold  { background-color: var(--status-gold-bg);  color: var(--status-gold-text); }
.status-red   { background-color: var(--status-red-bg);   color: var(--status-red-text); }
.status-green { background-color: var(--status-green-bg); color: var(--status-green-text); }

.account-menu-wrapper {
    position: relative;
    display: inline-flex;
    flex: 0 0 auto;
    min-width: 0;
    margin-left: auto;
}

.account-menu-dropdown-class {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    min-width: min(180px, 100%);
    max-width: 100%;
    background: #171310;
    border: 1px solid #866e1e;
    border-radius: 0.75rem;
    box-shadow: 0 10px 25px rgba(0,0,0,0.35);
    overflow: hidden;
    z-index: 40;
}
.account-menu-dropdown-class.hidden {
    display: none;
}




/* Table Section Canvas Box */
.tablecontainer-class {
    --tw-bg-opacity: 1;
    background-color: rgb(255 255 255 / var(--tw-bg-opacity, 1));
    border-radius: 0.75rem;
    border-width: 2px;
    --tw-border-opacity: 1;
    border-color: rgb(0 0 0 / var(--tw-border-opacity, 1));
    box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
    overflow: hidden;
    transition-property: all;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 300ms;
    text-align: center;
    margin: 0 clamp(0.75rem, 2vw, 1rem);
    width: auto;
}

.table-content-header {
    margin-top: 1.25rem;
    margin-bottom: 1.25rem;
    justify-content: start;
}

.table-content-header h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--dark);
}

.table-responsive-wrapper {
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
    min-width: 0;
}
.table-class {
    width: 100%;
    text-align: center;
    border-collapse: collapse;
    table-layout: auto;

    tr {
        border-bottom-width: 1px;
        --tw-border-opacity: 1;
        border-color: rgb(226 232 240 / var(--tw-border-opacity, 1));
        font-size: 0.75rem;
        line-height: 1rem;
        font-weight: 500;
        text-transform: uppercase;
        letter-spacing: 0.05em;
        display: center;
        align-items: center;
    }
    .table-class th:nth-child(4),
    .tablebody-class td:nth-child(4) {
        min-width: 140px;
        white-space: nowrap;
    }

    .table-class th:nth-child(7),
    .tablebody-class td:nth-child(7) {
        min-width: 150px;
        white-space: nowrap;
    }
}
.tablebody-class tr:nth-child(even) {
    background-color: #fdf6e3;
}
.tablebody-class tr:nth-child(odd) {
    background-color: #ffffff;
}
.tablebody-class tr:hover {
    background-color: #fef3c7;
}
.tbl-body {
	font-size: 0.875rem;
	line-height: 1.25rem;
	td {
		padding: 0.2rem 0.5rem;
	}
}
.table-class th,
.tabledata-class {
    padding: clamp(0.5rem, 1.5vw, 1rem) clamp(0.5rem, 1.5vw, 1.25rem);
    font-size: clamp(0.65rem, 0.3vw + 0.6rem, 0.75rem);
    white-space: nowrap;
}
/* Directory Presentation Grid */
.admin-data-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}
.table-class thead tr.tableheaderform-class {
    background: linear-gradient(135deg, #171310 0%, #2c2013 55%, #866e1e 100%);
    color: #deaf37;
    border-bottom: none;
}
.table-class thead tr.tableheaderform-class th {
    color: #deaf37;
}
.admin-data-table th {
    padding: 1rem 1.25rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border-color);
    background-color: #f8fafc;
}


.admin-data-table td {
    padding: 1.25rem;
    font-size: 0.9rem;
    color: var(--text);
    border: 1px solid #000000;
}

.admin-data-table tr:hover td {
    background-color: rgb(196, 161, 48);
}

.bold-cell { font-weight: 600; color: var(--dark); }
.text-muted-cell { color: var(--text-muted); }


/* ==========================================================================
   SECTION D: FORM ELEMENTS & INTERACTIVE COMPONENTS
   ========================================================================== */
.form-group {
    margin-bottom: 1.25rem;
    text-align: left;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 0.5rem;
}

.form-group input {
    width: 100%;
    padding: clamp(0.6rem, 1.5vw, 0.75rem) clamp(0.75rem, 2vw, 1rem);
    font-family: inherit;
    font-size: clamp(0.875rem, 0.3vw + 0.8rem, 0.95rem);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    outline: none;
    background-color: #f8f9fa;
    transition: all var(--transition-base);
}

.password-input-wrapper {
    position: relative;
}

.password-input-wrapper input {
    padding-right: 3rem;
}

.password-toggle-btn {
    position: absolute;
    right: 0.7rem;
    top: 60%;
    transform: translateY(-50%);
    border: none;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;    
    font-size: 1rem;
    padding: 0.25rem;
    border-radius: 6px;
    transition: color var(--transition-base), background-color var(--transition-base);
}

.password-toggle-btn:hover {
    color: var(--primary);
    background-color: #ffffff14;
}

.form-group input:focus {
    background-color: #ffffff;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(168, 132, 31, 0.15);
}

.form-group input.input-invalid {
    border-color: var(--error-color);
    background-color: #fffafb;
}

.captcha-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.captcha-box {
    flex: 1 1 min(160px, 100%);
    background-color: #f1f3f5;
    border: 1px dashed #ced4da;
    border-radius: 8px;
    height: clamp(40px, 6vw, 44px);
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 700;
    font-family: monospace;
    font-size: clamp(1rem, 2vw, 1.3rem);
    letter-spacing: 4px;
    color: var(--dark);
    user-select: none;
}

.refresh-btn {
    flex: 0 0 auto;
    width: clamp(40px, 6vw, 44px);
    height: clamp(40px, 6vw, 44px);
    background-color: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.1rem;
    transition: background-color var(--transition-base);
}

.refresh-btn:hover { background-color: #f8f9fa; }
.error-msg { font-size: 0.8rem; color: var(--error-color); margin-top: 0.35rem; display: none; }
.error-msg.visible { display: block; }

/* ==========================================================================
   SECTION E: ACTIONS, BUTTON SYSTEM & UTILITIES
   ========================================================================== */
.btn-submit {
    width: 100%;
    padding: clamp(0.7rem, 2vw, 0.85rem);
    margin-right: 0;              /* was 2rem — a fixed right-margin on a full-width button doesn't scale; drop it */
    background-color: var(--primary);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: clamp(0.9rem, 0.3vw + 0.85rem, 1rem);
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background-color var(--transition-base);
}

.btn-submit:hover { background-color: var(--secondary); }
.btn-submit:disabled { background-color: #cbd5e1; cursor: not-allowed; }

/* Fixed cut-off class structural elements */
.btn-outline-danger,
.btn-secondary-outline,
.btn-primary-gold {
    padding: clamp(0.5rem, 1.5vw, 0.6rem) clamp(0.9rem, 2.5vw, 1.25rem);
    font-size: clamp(0.8rem, 0.3vw + 0.75rem, 0.875rem);
    border-radius: 8px;
    cursor: pointer;
    transition: all var(--transition-base);
    max-width: 100%;
}

.btn-outline-danger:hover {
    background-color: var(--status-red-bg);
    border-color: var(--error-color);
}

.hidden { display: none !important; }

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Secondary Transparent Outline Action Button */
.btn-secondary-outline:hover {
    background-color: #f8fafc;
    border-color: #cbd5e1;
    color: var(--dark);
}

/* Primary Flat Gold Action Button */

.btn-primary-gold:hover {
    background-color: var(--secondary);
}

.header-action-cluster {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    flex: 1 1 auto;
    justify-content: flex-end;
    min-width: 0;
}
.you-indicator-class {
    font-size: 0.75rem;
    font-weight: 600;
    color: #a8841f;
    font-style: italic;
}

.other-super-admin-indicator-class {
    font-size: 0.75rem;
    font-weight: 600;
    color: #64748b;
    font-style: italic;
}

.dropbtn {
  background-color: #4CAF50;
  color: white;
  padding: 16px;
  font-size: 16px;
  border: none;
  cursor: pointer;
}
.dropdown {
  position: relative;
  display: flex;
  justify-content: end;
}

.dropdown-content {
  position: fixed;
  background-color: var(--bg-light);
  min-width: 160px;
  min-height: fit-content;
  box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
  z-index: 9999;
  border: 3px var(--border-clr) solid;
  border-radius: 1rem;
}

.action-button-big {
	--size: 4rem;
	width: var(--size);
	height: var(--size);
	padding: 0.1rem;
	border-radius: 0.75rem;
	transition-duration: 150ms;
	border: 2px solid var(--text-muted);
	background-color: var(--bg-light);
	svg {
		justify-self: center;
		fill: var(--text-muted);
	}
}

.btn-gold:hover{
	--clr: var(--hover-gold);
	--hover-shadow: 4px 4px 4px 0px color-mix(in srgb, var(--clr) 70%, transparent);
	border-color: var(--clr);
	background-color: color-mix(in srgb, var(--clr) 10%, transparent);
	box-shadow: var(--hover-shadow);
	
	svg {
		fill: var(--clr);
	}
}

.navigator {
    color: black;
    padding: 0.8rem 1rem;
    font-weight: 600;   
    display: block;
    border-radius: 1rem;
    text-decoration: none;
}
.navigator:hover {
  	transition-duration: 300ms;
	--clr: var(--hover-gold);
	background: linear-gradient(135deg, black 0%, #3a2a18 55%, var(--accent-clr) 100%);
	span {
		color: var(--clr);
	}
	svg {
		fill: var(--clr);
	}
}
.navigator span {
  font-size: 12px;
}

.svg-48 {
		height: 48px;
		width: 48px;
}