/* styles.css - Dark and Light Modes */
:root {
    --bg-color: #fff;
    --text-color: #000;
    --input-bg: #f0f0f0;
    --button-bg: #007bff;
    --button-text: #fff;
}

body.dark {
    --bg-color: #121212;
    --text-color: #fff;
    --input-bg: #333;
    --button-bg: #0056b3;
    --button-text: #fff;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: Arial, sans-serif;
    transition: background-color 0.3s, color 0.3s;
}

.container {
    max-width: 600px;
    margin: 50px auto;
    padding: 20px;
    border: 1px solid #ccc;
    border-radius: 8px;
}

input, button {
    display: block;
    width: 100%;
    margin: 10px 0;
    padding: 10px;
    box-sizing: border-box;
}

input {
    background-color: var(--input-bg);
    color: var(--text-color);
    border: 1px solid #ccc;
}

button {
    background-color: var(--button-bg);
    color: var(--button-text);
    border: none;
    cursor: pointer;
}

/* Profile-specific theme toggle */
.profile-header {
    position: relative;
    margin-bottom: 20px;
    padding: 15px;
    border-bottom: 1px solid var(--border-color, #444);
}

#theme-toggle {
    position: absolute;
    top: 20px;
    right: 10px;
    width: 36px;
    height: 36px;
    padding: 0;
    font-size: 1.1rem;
    background: transparent;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    color: var(--text-color);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

#theme-toggle:hover {
    background: rgba(100, 100, 100, 0.15);
    transform: scale(1.1);
}

#theme-toggle.dark-mode-icon::before {
    content: "☀️";
}

body.dark #theme-toggle.dark-mode-icon::before {
    content: "🌙";
}

/* Optional: if you prefer text instead of emoji */
#theme-toggle.text-mode {
    width: auto;
    height: auto;
    padding: 6px 10px;
    font-size: 0.85rem;
    border-radius: 16px;
    background: var(--input-bg);
}
/* Make tables responsive and prevent overflow */
.table-wrapper {
    overflow-x: auto;          /* Horizontal scroll if needed */
    margin: 20px 0;
    border: 1px solid #444;    /* Optional border for visibility */
    border-radius: 8px;
}

table {
    width: 100%;
    min-width: 800px;          /* Force minimum width so it scrolls on small screens */
    table-layout: fixed;       /* Prevents columns from exploding */
    border-collapse: collapse;
}

th, td {
    padding: 10px;
    border: 1px solid #444;
    text-align: left;
    word-break: break-word;    /* Break long words/emails */
    overflow-wrap: break-word; /* Modern equivalent */
    hyphens: auto;             /* Hyphenate if needed */
    vertical-align: middle;
}

/* Make actions column narrower and stack buttons if too wide */
.actions {
    white-space: nowrap;       /* Keep buttons on one line, but allow scroll */
    text-align: center;
}

.actions form {
    display: inline-block;
    margin: 4px 2px;
    vertical-align: middle;
}

.actions button, .actions select {
    font-size: 0.9em;
    padding: 6px 10px;
}

/* Status colors (already there, but ensure they don't widen) */
.status-pending, .status-approved, .status-suspended, .status-rejected {
    font-weight: bold;
}

body.admin-page .container {
    max-width: 100%; /* or 100% for full-width */
    width: 95%;
}

