/* calendar.html page styles (moved out of inline <style> blocks for the Content Security Policy) */
    :root {
      --credico-blue: #004B87;
      --credico-dark: #00325a;
      --credico-gray: #53565A;
      --credico-light: #f8f9fa;
      --credico-border: #e5e7eb;
    }

    * { margin: 0; padding: 0; box-sizing: border-box; }
    
    body {
      font-family: 'Chivo', sans-serif;
      background: #fff;
      color: var(--credico-gray);
    }

    /* Header */
    .page-header {
      background: var(--credico-blue);
      padding: 60px 0 40px;
      position: relative;
    }

    .back-link {
      color: rgba(255,255,255,0.7);
      text-decoration: none;
      font-size: 0.9rem;
      display: inline-flex;
      align-items: center;
      gap: 8px;
      margin-bottom: 30px;
      transition: color 0.3s;
    }
    .back-link:hover { color: #fff; }

    .page-header h1 {
      font-size: 2.5rem;
      font-weight: 700;
      color: #fff;
      margin-bottom: 10px;
    }

    .page-header p {
      font-size: 1rem;
      color: rgba(255,255,255,0.8);
      max-width: 600px;
    }

    /* Stats Bar */
    .stats-bar {
      background: var(--credico-dark);
      padding: 20px 0;
    }

    .stat-item {
      text-align: center;
      padding: 0 20px;
      border-right: 1px solid rgba(255,255,255,0.1);
    }
    .stat-item:last-child {
      border-right: none;
    }

    .stat-number {
      font-size: 1.75rem;
      font-weight: 700;
      color: #fff;
    }

    .stat-label {
      font-size: 0.75rem;
      color: rgba(255,255,255,0.6);
      text-transform: uppercase;
      letter-spacing: 1px;
    }

    /* Month Navigation */
    .month-nav {
      background: #fff;
      border-bottom: 1px solid var(--credico-border);
      position: sticky;
      top: 0;
      z-index: 100;
    }

    .month-tabs {
      display: flex;
      overflow-x: auto;
      scrollbar-width: none;
    }
    .month-tabs::-webkit-scrollbar { display: none; }

    .month-tab {
      padding: 16px 20px;
      font-weight: 500;
      font-size: 0.85rem;
      color: var(--credico-gray);
      text-decoration: none;
      white-space: nowrap;
      border-bottom: 2px solid transparent;
      transition: all 0.3s;
    }
    .month-tab:hover {
      color: var(--credico-blue);
      background: var(--credico-light);
    }
    .month-tab.active {
      color: var(--credico-blue);
      border-bottom-color: var(--credico-blue);
      font-weight: 600;
    }

    /* Main Content */
    .calendar-content {
      padding: 40px 0;
    }

    /* Month Sections */
    .month-section {
      margin-bottom: 60px;
    }

    .month-header {
      display: flex;
      align-items: center;
      gap: 16px;
      margin-bottom: 24px;
      padding-bottom: 16px;
      border-bottom: 2px solid var(--credico-blue);
    }

    .month-icon {
      width: 48px;
      height: 48px;
      background: var(--credico-blue);
      border-radius: 8px;
      display: flex;
      align-items: center;
      justify-content: center;
      color: #fff;
      font-weight: 700;
      font-size: 1.1rem;
    }

    .month-name {
      font-size: 1.5rem;
      font-weight: 700;
      color: var(--credico-gray);
    }

    /* Events Table */
    .events-table {
      width: 100%;
      border-collapse: collapse;
    }

    .events-table th {
      text-align: left;
      padding: 12px 16px;
      background: var(--credico-light);
      font-size: 0.75rem;
      font-weight: 600;
      color: var(--credico-gray);
      text-transform: uppercase;
      letter-spacing: 0.5px;
      border-bottom: 1px solid var(--credico-border);
    }

    .events-table td {
      padding: 16px;
      border-bottom: 1px solid var(--credico-border);
      vertical-align: middle;
    }

    .events-table tr:hover {
      background: var(--credico-light);
    }

    .event-date {
      font-weight: 600;
      color: var(--credico-blue);
      white-space: nowrap;
      width: 120px;
    }

    .event-day {
      font-size: 0.8rem;
      color: #999;
      font-weight: 400;
    }

    .event-name {
      font-weight: 500;
      color: var(--credico-gray);
    }

    .event-type-badge {
      display: inline-block;
      padding: 4px 12px;
      border-radius: 20px;
      font-size: 0.75rem;
      font-weight: 500;
    }

    .badge-meeting { background: #e8f4fd; color: var(--credico-blue); }
    .badge-holiday { background: #fce8e8; color: #c53030; }
    .badge-awards { background: #fef3e2; color: #b7791f; }
    .badge-leadership { background: #e6f7ed; color: #276749; }
    .badge-regional { background: #f3e8ff; color: #6b46c1; }
    .badge-team { background: #e8f5f5; color: #2c7a7b; }
    .badge-performance { background: #f0f0f0; color: #4a5568; }

    /* Featured Event */
    .featured-row {
      background: linear-gradient(90deg, rgba(0,75,135,0.03) 0%, transparent 100%);
    }
    .featured-row td:first-child {
      border-left: 3px solid var(--credico-blue);
    }

    /* ==================== */
    /* ADMIN MODE STYLES    */
    /* ==================== */

    /* Admin Toggle Button */
    .admin-toggle-btn {
      position: fixed;
      bottom: 24px;
      right: 24px;
      z-index: 999;
      background: var(--credico-blue);
      color: #fff;
      border: none;
      width: 56px;
      height: 56px;
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 1.3rem;
      cursor: pointer;
      box-shadow: 0 4px 20px rgba(0,75,135,0.4);
      transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    }
    .admin-toggle-btn:hover {
      transform: scale(1.1);
      box-shadow: 0 6px 30px rgba(0,75,135,0.5);
    }
    .admin-toggle-btn.active {
      background: #c53030;
      box-shadow: 0 4px 20px rgba(197,48,48,0.4);
    }

    /* Admin Toolbar */
    .admin-toolbar {
      display: none;
      background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
      padding: 16px 0;
      position: sticky;
      top: 0;
      z-index: 200;
      box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    }
    .admin-toolbar.show {
      display: block;
    }
    .admin-toolbar .container {
      display: flex;
      align-items: center;
      justify-content: space-between;
      flex-wrap: wrap;
      gap: 12px;
    }
    .admin-toolbar-label {
      display: flex;
      align-items: center;
      gap: 10px;
      color: #fff;
      font-weight: 600;
      font-size: 0.9rem;
    }
    .admin-toolbar-label i {
      background: rgba(255,255,255,0.15);
      padding: 6px;
      border-radius: 6px;
      font-size: 1rem;
    }
    .admin-toolbar-actions {
      display: flex;
      gap: 10px;
      flex-wrap: wrap;
    }
    .admin-btn {
      padding: 8px 16px;
      border-radius: 8px;
      border: none;
      font-size: 0.8rem;
      font-weight: 600;
      cursor: pointer;
      display: inline-flex;
      align-items: center;
      gap: 6px;
      transition: all 0.2s;
      font-family: 'Chivo', sans-serif;
    }
    .admin-btn:hover {
      transform: translateY(-1px);
    }
    .admin-btn-save {
      background: #38a169;
      color: #fff;
    }
    .admin-btn-save:hover { background: #2f855a; }
    .admin-btn-reset {
      background: rgba(255,255,255,0.15);
      color: #fff;
    }
    .admin-btn-reset:hover { background: rgba(255,255,255,0.25); }
    .admin-btn-exit {
      background: #e53e3e;
      color: #fff;
    }
    .admin-btn-exit:hover { background: #c53030; }

    /* Editable cells in admin mode */
    body.admin-mode .editable-cell {
      position: relative;
      cursor: text;
      border-radius: 4px;
      transition: all 0.2s;
    }
    body.admin-mode .editable-cell:hover {
      background: #e8f4fd;
    }
    body.admin-mode .editable-cell:focus {
      outline: 2px solid var(--credico-blue);
      outline-offset: 2px;
      background: #fff;
    }

    /* Add Event Button (per month) */
    .add-event-btn {
      display: none;
      margin-top: 12px;
      padding: 10px 20px;
      background: #fff;
      border: 2px dashed var(--credico-blue);
      border-radius: 8px;
      color: var(--credico-blue);
      font-weight: 600;
      font-size: 0.85rem;
      cursor: pointer;
      transition: all 0.2s;
      font-family: 'Chivo', sans-serif;
      width: 100%;
    }
    .add-event-btn:hover {
      background: #e8f4fd;
      border-style: solid;
    }
    body.admin-mode .add-event-btn {
      display: block;
    }

    /* Delete row button */
    .delete-row-btn {
      display: none;
      background: none;
      border: none;
      color: #e53e3e;
      cursor: pointer;
      font-size: 1rem;
      padding: 4px 8px;
      border-radius: 4px;
      transition: all 0.2s;
    }
    .delete-row-btn:hover {
      background: #fce8e8;
    }
    body.admin-mode .delete-row-btn {
      display: inline-block;
    }

    /* Type selector dropdown in admin mode */
    .type-select {
      display: none;
      padding: 6px 10px;
      border: 1px solid var(--credico-border);
      border-radius: 6px;
      font-size: 0.8rem;
      font-family: 'Chivo', sans-serif;
      background: #fff;
      cursor: pointer;
    }
    body.admin-mode .type-select {
      display: inline-block;
    }
    body.admin-mode .event-type-badge {
      display: none;
    }

    /* Featured toggle */
    .featured-toggle {
      display: none;
      cursor: pointer;
      font-size: 0.75rem;
      color: var(--credico-blue);
      padding: 2px 8px;
      border-radius: 4px;
      background: #e8f4fd;
      border: none;
      font-family: 'Chivo', sans-serif;
    }
    body.admin-mode .featured-toggle {
      display: inline-block;
    }

    /* Toast notification */
    .toast-notification {
      position: fixed;
      bottom: 90px;
      right: 24px;
      padding: 14px 24px;
      border-radius: 10px;
      color: #fff;
      font-weight: 500;
      font-size: 0.85rem;
      z-index: 9999;
      opacity: 0;
      transform: translateY(20px);
      transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
      display: flex;
      align-items: center;
      gap: 8px;
    }
    .toast-notification.show {
      opacity: 1;
      transform: translateY(0);
    }
    .toast-success { background: #38a169; }
    .toast-warning { background: #d69e2e; }
    .toast-error { background: #e53e3e; }

    /* Password Modal */
    .admin-modal-overlay {
      display: none;
      position: fixed;
      inset: 0;
      background: rgba(0,0,0,0.6);
      z-index: 9998;
      justify-content: center;
      align-items: center;
      backdrop-filter: blur(4px);
    }
    .admin-modal-overlay.show {
      display: flex;
    }
    .admin-modal {
      background: #fff;
      padding: 40px;
      border-radius: 16px;
      width: 90%;
      max-width: 400px;
      text-align: center;
      box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    }
    .admin-modal h3 {
      margin-bottom: 8px;
      color: var(--credico-gray);
      font-size: 1.3rem;
    }
    .admin-modal p {
      color: #999;
      font-size: 0.85rem;
      margin-bottom: 24px;
    }
    .admin-modal input {
      width: 100%;
      padding: 12px 16px;
      border: 2px solid var(--credico-border);
      border-radius: 10px;
      font-size: 1rem;
      font-family: 'Chivo', sans-serif;
      margin-bottom: 16px;
      text-align: center;
      letter-spacing: 4px;
    }
    .admin-modal input:focus {
      outline: none;
      border-color: var(--credico-blue);
    }
    .admin-modal-btns {
      display: flex;
      gap: 10px;
    }
    .admin-modal-btns button {
      flex: 1;
      padding: 12px;
      border-radius: 10px;
      border: none;
      font-weight: 600;
      font-size: 0.9rem;
      cursor: pointer;
      font-family: 'Chivo', sans-serif;
      transition: all 0.2s;
    }
    .modal-btn-cancel {
      background: var(--credico-light);
      color: var(--credico-gray);
    }
    .modal-btn-enter {
      background: var(--credico-blue);
      color: #fff;
    }
    .modal-btn-enter:hover {
      background: var(--credico-dark);
    }
    .modal-error {
      color: #e53e3e;
      font-size: 0.8rem;
      margin-top: -8px;
      margin-bottom: 12px;
      display: none;
    }

    /* Unsaved indicator */
    .unsaved-dot {
      display: none;
      width: 8px;
      height: 8px;
      background: #f6ad55;
      border-radius: 50%;
      animation: pulse 1.5s infinite;
    }
    .unsaved-dot.show {
      display: inline-block;
    }
    @keyframes pulse {
      0%, 100% { opacity: 1; }
      50% { opacity: 0.4; }
    }

    /* Mobile Cards View */
    @media (max-width: 768px) {
      .page-header h1 { font-size: 1.75rem; }
      
      .stats-bar .row { gap: 20px; }
      .stat-item {
        border-right: none;
        border-bottom: 1px solid rgba(255,255,255,0.1);
        padding-bottom: 15px;
        margin-bottom: 15px;
      }
      .stat-item:last-child {
        border-bottom: none;
        margin-bottom: 0;
        padding-bottom: 0;
      }

      .events-table, .events-table thead, .events-table tbody, .events-table th, .events-table td, .events-table tr {
        display: block;
      }
      .events-table thead { display: none; }
      .events-table tr {
        background: #fff;
        border: 1px solid var(--credico-border);
        border-radius: 8px;
        margin-bottom: 12px;
        padding: 16px;
      }
      .events-table td {
        border: none;
        padding: 4px 0;
        display: flex;
        justify-content: space-between;
        align-items: center;
      }
      .events-table td::before {
        content: attr(data-label);
        font-weight: 600;
        font-size: 0.75rem;
        color: #999;
        text-transform: uppercase;
      }
      .event-date { width: auto; }
      .featured-row td:first-child { border-left: none; }
      .featured-row { border-left: 3px solid var(--credico-blue); }

      .admin-toolbar .container { flex-direction: column; align-items: stretch; }
      .admin-toolbar-actions { justify-content: center; }
    }

    /* Footer */
    .page-footer {
      background: var(--credico-gray);
      padding: 40px 0;
      text-align: center;
    }
    .page-footer p {
      color: rgba(255,255,255,0.6);
      margin: 0;
    }
    .page-footer a {
      color: #fff;
      text-decoration: none;
    }
    .page-footer a:hover { text-decoration: underline; }

    html { scroll-behavior: smooth; }

    @media print {
      .month-nav, .back-link, .page-footer, .admin-toggle-btn, .admin-toolbar,
      .add-event-btn, .delete-row-btn, .type-select, .featured-toggle { display: none !important; }
      body.admin-mode .event-type-badge { display: inline-block !important; }
      .month-section { page-break-inside: avoid; }
    }
  

