/* =========================================================
   GLOBAL RESET & BASE
   ========================================================= */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    width: 100%;
    height: 100%;
    overflow-x: hidden;
    background: #f5f7fa;
    font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
    color: #1e293b;
    font-size: 14px;
}

/* =========================================================
   HEADERS (Roboto Only)
   ========================================================= */
h1, h2, h3, h4, h5, h6 {
    font-family: "Roboto", sans-serif;
    letter-spacing: 0.03em;
}

h1 { font-size: 16px; }
h2 { font-size: 15px; }
h3 { font-size: 14px; }
h4 { font-size: 13px; }
h5 { font-size: 12px; }
h6 { font-size: 11px; }

/* =========================================================
   APP LAYOUT FRAME
   ========================================================= */
.app-wrapper {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

/* =========================================================
   HEADER
   ========================================================= */
.app-header {
    height: 60px;
    flex-shrink: 0;
    background: #1e3a8a;
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    position: sticky;
    top: 0;
    z-index: 20;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo-mark {
    width: 28px;
    height: 28px;
    //background: #3b82f6;
    //border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
}

.logo-text {
    font-weight: 600;
    font-size: 14px;
}

.header-user {
    display: flex;
    align-items: center;
    gap: 8px;
}

.user-avatar {
    width: 28px;
    height: 28px;
    background: #2563eb;
    color: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* =========================================================
   TOP NAV MENU
   ========================================================= */
.top-nav {
    display: flex;
    justify-content: center;
}

.top-menu {
    list-style: none;
    display: flex;
    gap: 10px;
}

.top-menu-item {
    position: relative;
}

.top-menu-link {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 6px 12px;
    border-radius: 6px;
    color: #dbeafe;
    font-size: 13px;
}

.top-menu-link:hover {
    background: rgba(255,255,255,0.15);
}

/* Submenu */
.submenu {
    position: absolute;
    left: 0;
    top: 100%;
    min-width: 180px;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid rgba(0,0,0,0.08);
    box-shadow: 0 6px 20px rgba(0,0,0,0.14);
    opacity: 0;
    pointer-events: none;
    transform: translateY(6px);
    transition: 0.15s ease;
}

.submenu li a {
    display: block;
    padding: 8px 14px;
    text-decoration: none;
    color: #1e293b;
    font-size: 13px;
}

.submenu li a:hover {
    background: #e0e7ff;
}

/* Hover fix — keeps submenu open */
.top-menu-item:hover > .submenu,
.top-menu-item > .submenu:hover {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

/* =========================================================
   MAIN AREA (Sidebar + Content)
   ========================================================= */
.app-main {
    flex: 1;
    display: flex;
    height: calc(100vh - 60px); /* full height minus header */
}

/* =========================================================
   SIDEBAR (Full Height + Scroll)
   ========================================================= */
.sidebar {
    width: 240px;
    background: #eef2f6;
    border-right: 1px solid rgba(0,0,0,0.08);
    padding: 20px 16px;
    overflow-y: auto;
    height: 100%;
	padding-right:0px;
}

/* Sidebar Sections */
.sidebar-section {
    margin-bottom: 16px;
    border-bottom: 1px solid rgba(0,0,0,0.06);
    padding-bottom: 10px;
}

/* Collapsible header */
.sidebar-title {
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #475569;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    padding: 4px;
}

.sidebar-title::after {
    content: "▾";
    font-size: 11px;
    transition: 0.2s ease;
}

/* Collapsed rotated arrow */
.sidebar-section.collapsed .sidebar-title::after {
    transform: rotate(-90deg);
}

/* Menu inside section */
.sidebar-menu {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 6px;
}

/* Collapse hides items */
.sidebar-section.collapsed .sidebar-menu {
    display: none;
}

.sidebar-link {
    text-decoration: none;
    color: #334155;
    font-size: 13px;
    padding: 8px 10px;
    border-radius: 8px;
    font-weight: 500;
    transition: 0.15s ease;
	padding-right: 16px;
}

.sidebar-link:hover {
    background: #dbeafe;
    color: #1e3a8a;
}

.sidebar-link.active {
    background: #3b82f6;
    color: white;
    box-shadow: 0 1px 4px rgba(59,130,246,0.3);
}

/* =========================================================
   CONTENT AREA
   ========================================================= */
.content-area {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* =========================================================
   BUTTONS
   ========================================================= */
.btn {
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    border: 1px solid rgba(0,0,0,0.08);
    font-size: 13px;
    transition: 0.15s ease;
}

.btn.primary {
    background: #2563eb;
    color: white;
}

.btn.primary:hover {
    background: #1d4ed8;
}

.btn.subtle {
    background: #f1f5f9;
}

.btn.subtle:hover {
    background: #e2e8f0;
}

/* =========================================================
   CARDS
   ========================================================= */
.card {
    background: white;
    padding: 14px;
    border-radius: 12px;
    border: 1px solid rgba(0,0,0,0.06);
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
}

/* =========================================================
   TABLES
   ========================================================= */
.content-section {
    background: white;
    padding: 14px;
    border-radius: 12px;
    border: 1px solid rgba(0,0,0,0.06);
}

.table-wrapper {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.data-table thead {
    background: #e2e8f0;
    border-radius: 10px 10px 0 0;
    overflow: hidden;
}

.data-table thead th:first-child {
    border-top-left-radius: 10px;
}

.data-table thead th:last-child {
    border-top-right-radius: 10px;
}

.data-table th,
.data-table td {
    padding: 8px 6px;
    text-align: left;
}

.data-table tbody tr:nth-child(even) {
    background: #f8fafc;
}

.data-table tbody tr:hover {
    background: #dbeafe;
}

/* Status Pills */
.status-pill {
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
}

.status-live {
    background: #bbf7d0;
    color: #15803d;
}

.status-pending {
    background: #fef9c3;
    color: #ca8a04;
}

.status-disabled {
    background: #fee2e2;
    color: #b91c1c;
}

/* =========================================================
   MODALS
   ========================================================= */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    opacity: 0;
    pointer-events: none;
    transition: 0.2s ease;
}

.modal-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.modal-box {
    background: white;
    padding: 16px;
    max-width: 420px;
    width: 100%;
    border-radius: 12px;
    border: 1px solid rgba(0,0,0,0.12);
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}


/* ============================================
   FIX: Recent Activity list styling
   ============================================ */
.activity-list {
    list-style: none;
    margin-top: 6px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding-left: 0;

}

.activity-list li {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: #475569;
    /* padding: 4px 2px; */
}

.activity-meta {
    color: #64748b;
    font-size: 12px;
}


/* ============================================
   FIX: Content header layout (title left, actions right)
   ============================================ */
.content-header {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    flex-wrap: nowrap !important;
}

.content-header-actions {
    display: flex;
    gap: 10px;
}

/* ============================================
   FIX: Sidebar hover + active should fill full width
   and NOT overlap during hover animation
   ============================================ */
.sidebar-link {
    display: block;
    width: 100%;
    padding: 10px 12px;
    border-radius: 6px;
    transition: background 0.12s ease, color 0.12s ease;
    position: relative;
}

.sidebar-link:hover {
    background: #dbeafe;
    color: #1e3a8a;
    z-index: 1;
}

.sidebar-link.active {
    background: #3b82f6;
    color: white;
    z-index: 2;
}

.sidebar-menu {
    padding-right: 4px; /* ensure spacing to right edge */
}


/* ================================
   GOREHALLOW — COMPACT FORM SYSTEM
   ================================ */

form {
    display: flex;
    flex-direction: column;
    gap: 10px; /* tighter spacing between fields */
    width: 100%;
}

/* Labels */
form label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #2a2f3b;
    margin-bottom: 2px; /* reduced spacing */
}

/* Inputs + Textareas + Select */
form input[type="text"],
form input[type="password"],
form input[type="email"],
form input[type="number"],
form input[type="url"],
form textarea,
form select {
    width: 100%;
    padding: 7px 10px; /* more compact */
    border-radius: 6px;
    border: 1px solid #c8ced8;
    background: #ffffff;
    font-size: 0.95rem; /* slightly smaller font */
    color: #2a2f3b;
    font-family: inherit;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

/* Focus */
form input:focus,
form textarea:focus,
form select:focus {
    border-color: #3a80ff;
    box-shadow: 0 0 0 2px rgba(58, 128, 255, 0.18);
    outline: none;
}

/* Textarea */
form textarea {
    min-height: 80px; /* more compact */
    resize: vertical;
}

/* Select arrow */
form select {
    appearance: none;
    background-image:
        linear-gradient(45deg, transparent 50%, #3a80ff 50%),
        linear-gradient(135deg, #3a80ff 50%, transparent 50%);
    background-position:
        calc(100% - 16px) calc(50% - 3px),
        calc(100% - 10px) calc(50% + 3px);
    background-size: 5px 5px;
    background-repeat: no-repeat;
    padding-right: 28px;
}

/* Form group wrapper */
.form-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 6px; /* reduced */
}

/* Modal body spacing tighter */
#formModal .modal-body {
    padding: 6px 4px;
}

/* Submit button smaller too */
#formModal .modal-footer .btn.primary {
    width: 100px;
    padding: 6px 10px;
    font-size: 0.9rem;
}

/* ============================
   LOGIN PAGE STYLING
   ============================ */

.login-wrapper {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f2f4f8;
}

.login-card {
    width: 350px;
    background: #ffffff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.12);
}

.login-title {
    text-align: center;
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.login-error {
    background: #ffe6e6;
    color: #a40000;
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 15px;
    font-size: 0.9rem;
    text-align: center;
    font-weight: 600;
}

.icon-btn {
    background: none;
    border: none;
    font-size: 1.1rem;
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 6px;
    transition: background 0.2s;
}

.icon-btn:hover {
    background: rgba(0,0,0,0.08);
}

.icon-btn.delete:hover {
    background: #ffe3e3;
}


.script-layout {
    display: grid;
    grid-template-columns: 280px auto;
    gap: 20px;
    margin-top: 20px;
}

.script-left {
    background: #fff;
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.script-left h2 {
    font-size: 1.1rem;
    margin-bottom: 8px;
}

.script-list, .scene-list {
    list-style: none;
    padding: 0;
    margin: 0 0 20px 0;
}

.script-link, .scene-link {
    padding: 8px 10px;
    border-radius: 6px;
    cursor: pointer;
    margin-bottom: 4px;
}

.script-link:hover, .scene-link:hover {
    background: #eef3ff;
}

.script-link.active, .scene-link.active {
    background: #3a80ff;
    color: white;
}

.script-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.script-right {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.editor-area {
    background: #f7f7f7;
    border: 1px solid #ccd2db;
    min-height: 500px;
    padding: 15px;
    border-radius: 10px;
    white-space: pre-wrap;
    font-family: "Courier New", monospace;
    font-size: 1rem;
}


.format-indicator {
    margin-bottom: 10px;
    padding: 8px 12px;
    background: rgba(255,255,255,0.06);
    border-left: 3px solid #4a90e2;
    font-size: 0.9rem;
    color: #cfd8e3;
}
#formatLabel {
    font-weight: bold;
    color: #4a90e2;
}


#scriptEditor {
    width: 100%;
    min-height: 500px;
    font-family: "Courier New", monospace;
    font-size: 14px;
    white-space: pre-wrap;
    outline: none;
}

.line {
    white-space: pre-wrap;
    padding: 2px 0;
}

/* SLUGLINE */
.line.slugline {
    text-transform: uppercase;
    font-weight: bold;
}

/* CHARACTER NAME */
.line.character {
    margin-left: 22ch;
    text-transform: uppercase;
}

/* PARENTHETICAL */
.line.parenthetical {
    margin-left: 26ch;
}

/* DIALOG */
.line.dialog {
    margin-left: 10ch;
    max-width: 40ch;
    white-space: pre-wrap;
}

/* ACTION (default) */
.line.action {
    margin-left: 0;
}

/* TRANSITION */
.line.transition {
    text-transform: uppercase;
    margin-left: 50ch;
}


.scene-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 8px;
}

.scene-title {
    flex-grow: 1;
    cursor: pointer;
}

.scene-actions {
    display: flex;
    gap: 6px;
}

.scene-actions .icon-btn {
    opacity: 0.7;
    font-size: 0.95rem;
}

.scene-actions .icon-btn:hover {
    opacity: 1;
}


/* ===== Scene Scroll Box ===== */
.scene-scroll-box {
    max-height: 180px;
	height:180px;
    overflow-y: auto;
    border: 1px solid rgba(155, 155, 155, 0.22);
    border-radius: 6px;
    padding: 6px 4px;
    margin-bottom: 20px;
    background: rgba(255, 255, 255, 0.03);
}

/* Hide scrollbar for Chrome, Edge, Safari */
.scene-scroll-box::-webkit-scrollbar {
    width: 6px;
}
.scene-scroll-box::-webkit-scrollbar-track {
    background: transparent;
}
.scene-scroll-box::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

/* Firefox scrollbar */
.scene-scroll-box {
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.2) transparent;
}



/* Shared actions container for scene + script lists */
.scene-actions,
.script-actions {
    float: right;
    display: flex;
    gap: 4px;
}

.scene-actions .icon-btn,
.script-actions .icon-btn {
    background: transparent;
    border: none;
    padding: 2px 5px;
    cursor: pointer;
    opacity: 0.7;
    transition: 0.15s;
    font-size: 14px;
}

.scene-actions .icon-btn:hover,
.script-actions .icon-btn:hover {
    opacity: 1;
    transform: scale(1.15);
}

.scene-actions .icon-btn.delete,
.script-actions .icon-btn.delete {
    color: #e35c5c;
}


/* Scrollable editor container */
.editor-container {
    border: 1px solid rgba(155, 155, 155, 0.22);
    border-radius: 6px;
    padding: 10px;
    height: calc(100vh - 400px); /* fits the screen without overlapping footer/buttons */
    overflow-y: auto;
    overflow-x: hidden;
}

/* Make scrollbar minimal + dark */
.editor-container::-webkit-scrollbar {
    width: 6px;
}

.editor-container::-webkit-scrollbar-track {
    background: #FFF;
}

.editor-container::-webkit-scrollbar-thumb {
    background: rgba(155, 155, 155, 0.22);
    border-radius: 3px;
}

.editor-container::-webkit-scrollbar-thumb:hover {
    background: #FFF;
}


/* GRID OF 5 PER ROW */
.locations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 18px;
}

/* LOCATION CARD */
.location-card {
    background: #fff;
    padding: 14px;
    border-radius: 12px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.loc-title {
    font-family: 'Roboto', sans-serif;
    font-size: 16px;
    margin-bottom: 10px;
    color: #1e1f26;
}

/* IMAGE */
.location-card .loc-image img {
    width: 100%;
    height: 140px;           /* MATCH EXACTLY */
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 12px;
}


.loc-no-image {
    width: 160px;
    height: 140px; /* SAME AS IMAGE HEIGHT */
    background: #eef0f4;
    border-radius: 10px;
    display:flex;
    align-items:center;
    justify-content:center;
    color:#777;
    font-size:14px;
    margin-bottom: 12px;
    border: 1px dashed #c9ced6;
}


.loc-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}


.btn.script-selected {
    background-color: #2b7bff;
    color: #fff;
    border-color: #2b7bff;
}


.btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

sup {
  font-size: 0.6em; /* Makes the superscript 75% the size of the parent element's font size */
  /* Or use a fixed pixel value: */
  /* font-size: 10px; */
  
  /* You can also adjust vertical alignment if needed */
  vertical-align: super; /* Default, but can be explicitly set */
}



/* === LUT Panel Layout === */

.lut-flex {
    display: flex;
    gap: 20px;
    margin-top: 10px;
}

.lut-image-area {
    width: 800px;
}

.lut-image-container {
    width: 800px;
    height: 600px;
    border-radius: 8px;
    border: 1px solid #d0d6e0;
    overflow: hidden;
    background: #f2f4f7;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lut-preview {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.lut-empty {
    width: 100%;
    text-align: center;
    color: #7a869a;
    font-size: 14px;
}

.lut-buttons {
    display: flex;
    gap: 10px;
    margin-top: 10px;
    align-items: center;
}

.lut-upload-image-form input[type="file"],
.lut-upload-box input[type="file"] {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
}

/* Disabled Upload button state */
.lut-upload-disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* RIGHT SIDE: LUT LIST */

.lut-list-area {
    flex: 1;
    min-width: 0;
}

.lut-upload-box {
    margin-bottom: 10px;
}

.lut-list {
    max-height: 600px;
    border: 1px solid #d0d6e0;
    border-radius: 8px;
    padding: 8px;
    overflow-y: auto;
    background: #f8fafc;
}

/* Minimal vertical scrollbar */
.lut-list::-webkit-scrollbar {
    width: 6px;
}
.lut-list::-webkit-scrollbar-thumb {
    background: #a8b3c7;
    border-radius: 10px;
}
.lut-list::-webkit-scrollbar-track {
    background: transparent;
}

.lut-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4px 6px;
    border-bottom: 1px solid #e3e6ed;
}

.lut-item:last-child {
    border-bottom: none;
}

.lut-name {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    text-align: left;
    font-size: 14px;
    color: #1d3c6a;
    cursor: pointer;
}

.lut-name:hover {
    text-decoration: underline;
}

.lut-del-btn {
    border: none;
    background: #ff4b4b;
    color: #fff;
    border-radius: 6px;
    font-size: 12px;
    width: 24px;
    height: 24px;
    line-height: 24px;
    text-align: center;
    padding: 0;
    cursor: pointer;
}

.lut-del-btn:hover {
    background: #c23232;
}

.lut-empty-list {
    text-align: center;
    padding: 8px;
    color: #7a869a;
    font-size: 13px;
}

/* General disabled state for existing buttons if not already present */
.btn:disabled,
.btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}


/* Button row spacing */
.lut-buttons {
    display: flex;
    gap: 10px;
    margin-top: 12px;
}

/* Make each form stretch equally */
.lut-btn-box {
    flex: 1;
}

/* Hidden file input but clickable when active */
.lut-file-input {
    margin-bottom: 6px;
}

/* Disabled state matches your button rules */
.btn.disabled,
.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Button row */
.lut-buttons {
    display: flex;
    gap: 10px;
    margin-top: 12px;
}

/* Each form takes equal width */
.lut-btn-box {
    flex: 1;
}

/* Hide the native file input */
.lut-file-input {
    display: none;
}

/* Force buttons same height */
.lut-buttons .btn {
    width: 100%;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Disabled button appearance */
.btn.disabled,
.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}



/* =========================
   CALENDAR (Gorehallow)
========================= */

.calendar-wrap {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 18px;
  align-items: start;
}

@media (max-width: 1100px) {
  .calendar-wrap {
    grid-template-columns: 1fr;
  }
}

.calendar-card {
  padding: 16px;
}

.calendar-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.calendar-monthtitle {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.calendar-nav {
  display: flex;
  gap: 8px;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 10px;
}

.calendar-dow {
  font-size: 12px;
  font-weight: 700;
  opacity: 0.75;
  padding: 6px 8px;
}

.calendar-day {
  position: relative;
  background: rgba(0,0,255,0.05);
  border: 1px solid rgba(0,0,255,0.1);
  border-radius: 14px;
  min-height: 88px;
  padding: 10px 10px 12px 10px;
  cursor: pointer;
  transition: transform 0.12s ease, border-color 0.12s ease, background 0.12s ease;
  overflow: hidden;
}

.calendar-day:hover {
  transform: translateY(-1px);
  border: 1px solid rgba(0,0,255,0.3);
  background: rgba(0,0,255,0.07);
}

.calendar-day.is-outside {
  opacity: 0.45;
  border: 1px solid rgba(0,0,255,0.1);
}

.calendar-day.is-today {
  border: 2px solid rgba(0,0,255,0.7);
}

.calendar-day.is-selected {
  border-color: rgba(120,170,255,0.9);
  background: rgba(120,170,255,0.10);
}

.calendar-daynum {
  font-size: 14px;
  font-weight: 700;
  opacity: 0.9;
}

.calendar-add {
  position: absolute;
  top: 8px;
  right: 10px;
  width: 20px;
  height: 20px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(0,0,0,0.15);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: transform 0.12s ease, border-color 0.12s ease;
}

.calendar-add:hover {
  transform: scale(1.03);
  border-color: rgba(255,255,255,0.18);
}

.calendar-badge {
  position: absolute;
  left: 10px;
  bottom: 10px;
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(120,170,255,0.18);
  border: 1px solid rgba(120,170,255,0.25);
  opacity: 0.95;
}

.calendar-right h3 {
  margin: 0 0 10px 0;
}

.day-events {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.day-event {
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.04);
  border-radius: 14px;
  padding: 12px 12px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.day-event-time {
  font-weight: 700;
  font-size: 13px;
  opacity: 0.9;
  margin-bottom: 6px;
}

.day-event-desc {
  font-size: 13px;
  line-height: 1.35;
  opacity: 0.95;
  white-space: pre-wrap;
}

.day-event-actions {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.icon-btn.danger {
  background: rgba(255,80,80,0.12);
  border: 1px solid rgba(255,80,80,0.22);
}

.calendar-empty {
  padding: 14px;
  border: 1px dashed rgba(255,255,255,0.18);
  border-radius: 14px;
  opacity: 0.85;
}


/* =========================
   MAILER
========================= */

.mailer-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.mailer-section {
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 14px;
  padding: 14px;
  background: rgba(255,255,255,0.03);
}

.mailer-section h3 {
  margin-top: 0;
  margin-bottom: 10px;
}

.mailer-list {
  max-height: 220px;
  overflow-y: auto;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.08);
}

.mailer-item {
  display: flex;
  justify-content: space-between;
  padding: 8px 10px;
  cursor: pointer;
}

.mailer-item:hover {
  background: rgba(255,255,255,0.05);
}

.mailer-item.selected {
  background: rgba(120,170,255,0.18);
}

.mailer-events {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mailer-footer {
  margin-top: 18px;
}
