.attendance-app {
      margin-top: 30px;
    }

    .attendance-dashboard {
      display: grid;
      grid-template-columns: repeat(4, minmax(0, 1fr));
      gap: 14px;
      margin: 24px 0;
    }

    .attendance-stat {
      padding: 18px;
      border: 1px solid rgba(128,128,128,.23);
      border-radius: 14px;
      background: var(--card-bg, #fff);
    }

    .attendance-stat span {
      display: block;
      font-size: .85rem;
      opacity: .75;
    }

    .attendance-stat strong {
      display: block;
      margin-top: 8px;
      font-size: 1.9rem;
    }

    .attendance-panel {
      padding: 22px;
      margin-bottom: 24px;
      border: 1px solid rgba(128,128,128,.23);
      border-radius: 14px;
    }

    .attendance-panel h2 {
      margin-top: 0;
    }

    .attendance-form {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 15px;
    }

    .attendance-field {
      display: flex;
      flex-direction: column;
      gap: 7px;
      min-width: 0;
    }

    .attendance-field label {
      font-size: .9rem;
      font-weight: 650;
    }

    .attendance-field input,
    .attendance-field select,
    .attendance-field textarea,
    .attendance-toolbar input,
    .attendance-toolbar select {
      box-sizing: border-box;
      width: 100%;
      min-width: 0;
      padding: 11px 12px;
      border: 1px solid #c9c9c9;
      border-radius: 8px;
      font: inherit;
      background: var(--input-bg, #fff);
      color: var(--input-color, #222);
    }

    .attendance-field.full {
      grid-column: 1 / -1;
    }

    .attendance-actions {
      display: flex;
      flex-wrap: wrap;
      gap: 10px;
      margin-top: 18px;
    }

    .attendance-btn {
      padding: 11px 15px;
      border: 1px solid #7027a0;
      border-radius: 8px;
      background: #7027a0;
      color: white;
      font: inherit;
      font-weight: 650;
      cursor: pointer;
    }

    .attendance-btn.secondary {
      color: inherit;
      background: transparent;
      border-color: #999;
    }

    .attendance-btn.danger {
      background: #a92323;
      border-color: #a92323;
    }

    .attendance-btn:disabled {
      opacity: .5;
      cursor: not-allowed;
    }

    .attendance-toolbar {
      display: grid;
      grid-template-columns: 2fr 1fr;
      gap: 12px;
      margin: 20px 0;
    }

    .attendance-table-wrap {
      overflow-x: auto;
      border: 1px solid rgba(128,128,128,.23);
      border-radius: 12px;
    }

    .attendance-table {
      width: 100%;
      min-width: 850px;
      border-collapse: collapse;
      font-size: .9rem;
    }

    .attendance-table th,
    .attendance-table td {
      padding: 13px 12px;
      text-align: left;
      vertical-align: middle;
      border-bottom: 1px solid rgba(128,128,128,.18);
    }

    .attendance-table th {
      background: rgba(128,128,128,.08);
      white-space: nowrap;
    }

    .attendance-table tr:last-child td {
      border-bottom: 0;
    }

    .attendance-table select,
    .attendance-table input {
      box-sizing: border-box;
      width: 100%;
      min-width: 105px;
      padding: 9px;
      border: 1px solid #c9c9c9;
      border-radius: 7px;
      background: var(--input-bg, #fff);
      color: var(--input-color, #222);
      font: inherit;
    }

    .attendance-person {
      font-weight: 700;
    }

    .attendance-code {
      font-size: .8rem;
      opacity: .7;
    }

    .attendance-status {
      display: inline-block;
      padding: 5px 9px;
      border-radius: 20px;
      font-size: .78rem;
      font-weight: 750;
      white-space: nowrap;
    }

    .status-presente {
      color: #176534;
      background: #d8f3df;
    }

    .status-atrasado {
      color: #795500;
      background: #fff0c2;
    }

    .status-ausente {
      color: #922222;
      background: #f8d9d9;
    }

    .status-justificado {
      color: #24538a;
      background: #dcecff;
    }

    .status-sin-marcar {
      color: #555;
      background: #e9e9e9;
    }

    .attendance-progress {
      height: 12px;
      overflow: hidden;
      margin: 14px 0;
      border-radius: 20px;
      background: rgba(128,128,128,.2);
    }

    .attendance-progress div {
      width: 0;
      height: 100%;
      border-radius: inherit;
      background: #7027a0;
      transition: width .25s ease;
    }

    .attendance-history {
      display: grid;
      gap: 12px;
    }

    .attendance-history-item {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      padding: 15px;
      border: 1px solid rgba(128,128,128,.22);
      border-radius: 10px;
    }

    .attendance-history-item p {
      margin: 5px 0 0;
      opacity: .75;
      font-size: .88rem;
    }

    .attendance-empty {
      padding: 24px;
      text-align: center;
      opacity: .75;
    }

    .attendance-note {
      font-size: .9rem;
      line-height: 1.65;
      opacity: .8;
    }

    .attendance-message {
      margin-top: 14px;
      font-size: .9rem;
    }

    .attendance-section-heading {
      margin-bottom: 8px;
    }

    @media (max-width: 800px) {
      .attendance-dashboard {
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }

      .attendance-form {
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }
    }

    @media (max-width: 520px) {
      .attendance-form,
      .attendance-toolbar {
        grid-template-columns: 1fr;
      }

      .attendance-field.full {
        grid-column: auto;
      }

      .attendance-panel {
        padding: 15px;
      }
    }
