:root {
    --dark-purple: #482865;
    --secondary-purple: #783A8E;
    --tertiary-purple: #8B3E90;
    --light-green: #C3D200;
    --med-green: #8FB22D;
    --green: #0C6C31;
    --dark-green: #095126;
    --red: #C0392B;
    --red-bg: #FDEDEC;
    --fc-button-bg-color: var(--dark-purple);
    --fc-button-border-color: var(--dark-purple);
    --fc-button-hover-bg-color: var(--secondary-purple);
    --fc-button-hover-border-color: var(--secondary-purple);
    --fc-button-active-bg-color: var(--secondary-purple);
    --fc-button-active-border-color: var(--secondary-purple);
    --fc-today-bg-color: rgba(195, 210, 0, 0.14);
    --fc-event-border-color: transparent;
    --fc-page-bg-color: #fff;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: Roboto, Arial, sans-serif;
    font-weight: 300;
    color: #000;
    background: #fff;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.site-header {
    background: linear-gradient(180deg, #482865 0%, #783A8E 100%);
    color: #fff;
    display: flex;
    align-items: center;
    gap: 22px;
    padding: 14px 28px;
}

.header-logo { height: 42px; display: block; }

.header-title {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.2px;
}

.header-user {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 14px;
    font-weight: 400;
}

.header-user a {
    color: var(--light-green);
    font-weight: 700;
    text-decoration: none;
}

.header-user a:hover { text-decoration: underline; }

.divider { height: 3px; background: var(--light-green); }

main {
    flex: 1;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px 28px 40px;
}

.toolbar {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.legend { display: flex; gap: 10px; flex-wrap: wrap; }

.chip {
    font-size: 12px;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: 999px;
    letter-spacing: 0.3px;
}

.t-projects { background: #783A8E; color: #fff; }
.t-servicedesk { background: #0C6C31; color: #fff; }
.t-adhoc { background: #8FB22D; color: #482865; }
.t-private { background: #482865; color: #fff; }
.t-outlook { background: #8B3E90; color: #fff; }

.notice {
    background: var(--red-bg);
    color: var(--red);
    border: 1px solid var(--red);
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 400;
    margin-bottom: 16px;
}

.toolbar .btn-primary { margin-left: auto; }

.btn-primary {
    background: var(--med-green);
    color: var(--dark-purple);
    font-weight: 700;
    font-family: inherit;
    font-size: 14px;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
}

.btn-primary:hover { background: var(--light-green); }

.btn-ghost {
    background: #fff;
    color: var(--dark-purple);
    font-weight: 500;
    font-family: inherit;
    font-size: 14px;
    border: 1px solid #c9c9c9;
    padding: 10px 18px;
    border-radius: 6px;
    cursor: pointer;
}

.btn-ghost:hover { border-color: var(--secondary-purple); }

.btn-danger {
    background: var(--red-bg);
    color: var(--red);
    font-weight: 700;
    font-family: inherit;
    font-size: 14px;
    border: 1px solid var(--red);
    padding: 10px 18px;
    border-radius: 6px;
    cursor: pointer;
}

.btn-danger:hover { background: var(--red); color: #fff; }

#calendar { font-weight: 400; }

.fc .fc-toolbar-title {
    color: var(--secondary-purple);
    font-weight: 700;
    font-size: 20px;
}

.fc .fc-button { font-weight: 500; text-transform: capitalize; }

.fc .fc-col-header-cell-cushion {
    color: var(--dark-purple);
    font-weight: 700;
    text-decoration: none;
}

.fc .fc-daygrid-day-number { color: #000; text-decoration: none; }

.fc-event { cursor: pointer; }

.fc .fc-event-title, .fc .fc-event-time { font-weight: 500; }

.hint { font-size: 12px; color: #666; margin-top: 14px; }

.site-footer { margin-top: auto; }

.footer-inner {
    background: linear-gradient(180deg, #482865 0%, #783A8E 100%);
    color: #fff;
    text-align: center;
    padding: 16px;
    font-size: 13px;
    font-weight: 300;
}

.dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--light-green);
    margin: 0 12px;
    vertical-align: middle;
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(72, 40, 101, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    z-index: 50;
}

.modal-backdrop[hidden] { display: none; }

.modal {
    background: #fff;
    border-radius: 10px;
    border-top: 5px solid var(--light-green);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.3);
    padding: 26px 28px;
    width: 100%;
    max-width: 500px;
    max-height: 92vh;
    overflow-y: auto;
}

.modal h2 {
    margin: 0 0 16px;
    color: var(--secondary-purple);
    font-weight: 700;
    font-size: 20px;
}

.modal label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: var(--dark-purple);
    margin-bottom: 12px;
}

.modal input,
.modal select,
.modal textarea {
    display: block;
    width: 100%;
    margin-top: 5px;
    padding: 9px 10px;
    border: 1px solid #cfcfcf;
    border-radius: 6px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 400;
    background: #fff;
    color: #000;
}

.modal input:focus,
.modal select:focus,
.modal textarea:focus {
    outline: 2px solid var(--med-green);
    border-color: var(--med-green);
}

.modal input:disabled,
.modal select:disabled,
.modal textarea:disabled {
    background: #f3f3f3;
    color: #444;
}

.row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.meta { font-size: 12px; color: #666; margin: 0 0 8px; }

.error {
    background: var(--red-bg);
    color: var(--red);
    border: 1px solid var(--red);
    padding: 9px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 400;
    margin: 0 0 12px;
}

.actions { display: flex; align-items: center; gap: 10px; margin-top: 4px; }

.spacer { flex: 1; }

.login-page {
    min-height: 100vh;
    width: 100%;
    background: linear-gradient(180deg, #482865 0%, #783A8E 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding: 24px;
}

.circle { position: absolute; border-radius: 50%; }

.c1 { width: 340px; height: 340px; background: var(--light-green); top: -160px; left: -140px; }
.c2 { width: 220px; height: 220px; background: var(--green); top: 90px; left: -130px; opacity: 0.9; }
.c3 { width: 320px; height: 320px; background: var(--tertiary-purple); bottom: -150px; right: -130px; }
.c4 { width: 180px; height: 180px; background: var(--med-green); bottom: -50px; right: 140px; }

.login-card {
    position: relative;
    text-align: center;
    color: #fff;
    max-width: 460px;
}

.login-logo { height: 64px; margin-bottom: 28px; }

.login-card h1 {
    color: var(--light-green);
    font-weight: 900;
    font-size: 35px;
    margin: 0 0 12px;
}

.login-card p {
    font-weight: 300;
    font-size: 15px;
    line-height: 1.5;
    margin: 0 0 28px;
}

.btn-signin {
    display: inline-block;
    background: var(--med-green);
    color: var(--dark-purple);
    font-weight: 700;
    font-size: 15px;
    padding: 13px 28px;
    border-radius: 6px;
    text-decoration: none;
}

.btn-signin:hover { background: var(--light-green); }

.login-footer {
    position: relative;
    color: #fff;
    font-size: 13px;
    font-weight: 300;
    margin-top: 48px;
}

.login-footer span { color: var(--light-green); margin: 0 10px; }

@media (max-width: 640px) {
    .site-header { padding: 12px 16px; gap: 12px; }
    .header-logo { height: 32px; }
    .header-title { font-size: 15px; }
    .header-user span { display: none; }
    main { padding: 16px 14px 32px; }
    .row { grid-template-columns: 1fr; }
    .toolbar .btn-primary { margin-left: 0; width: 100%; }
    .fc .fc-toolbar { flex-direction: column; gap: 8px; }
    .login-card h1 { font-size: 28px; }
}
