body {
    font-family: sans-serif;
    margin: 0;
    padding: 20px;
    line-height: 1.6;
}

.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 0;
}

.login-row {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: center;
}

.navbar {
    background: #eee;
    padding: 10px;
}

.nav-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0 auto;
}

.nav-brand {
    font-weight: bold;
    text-decoration: none;
    color: #333;
    display: flex;
    align-items: center;
    gap: 8px;
}

@media (max-width: 432px) {
    .nav-brand > span {
        display: none;
    }
}

.nav-logo {
    height: 28px;
    width: auto;
}

.nav-links {
    display: flex;
    gap: 15px;
}

.nav-links a {
    text-decoration: none;
    color: #007bff;
}

.card {
    border: 1px solid #ccc;
    padding: 15px;
    margin-bottom: 10px;
}

.flash {
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid;
}

.flash-error {
    border-color: red;
    color: red;
}

.flash-success {
    border-color: green;
    color: green;
}

.panels {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.btn {
    display: inline-block;
    padding: 8px 12px;
    background: #007bff;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-weight: bold;
}

.upload-form {
    display: flex;
    flex-direction: row;
    align-items: center;
    overflow: hidden;
    margin-top: 15px;
    flex-wrap: wrap;
    background: #f8f9fa;
    padding: 15px;
    border-radius: 6px;
    border: 1px solid #dee2e6;

    & > input[type="file"] {
        flex-grow: 1;
    }

    & > button {
        padding: 8px 16px;
        background: #28a745;
        color: #fff;
        border: none;
        border-radius: 4px;
        cursor: pointer;
    }
}

@media (max-width: 432px) {
    .upload-form > button {
        width: 100%;
        margin-top: 10px;
    }
}

.initiative-form {
    margin-top: 15px;
    background: #f8f9fa;
    padding: 20px;
    border-radius: 6px;
    border: 1px solid #dee2e6;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    font-weight: bold;
    margin-bottom: 5px;
}

.form-group input[type="text"],
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
}

.dokobit-text {
    margin-top: 12px;
    font-size: 0.9em;
    color: #555;
}

.dokobit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: 1px solid #999;
    border-radius: 4px;
    color: #555;
    text-decoration: none;
    vertical-align: middle;
}

.login-hint {
    text-align: center;
    margin-top: 20px;
    font-size: 0.85em;
    color: #888;
}

.login-hint a {
    color: #888;
    text-decoration: underline;
}

.btn-pdf-view {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    font-size: 0.85em;
    background: transparent;
    color: #555;
    border: 1px solid #bbb;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s, color 0.15s;

    &:hover {
        background: #f0f0f0;
        color: #333;
        border-color: #999;
    }

    &::before {
        content: "📄";
        font-size: 0.9em;
    }
}

/* PDF viewer modal preview */
.pdf-viewer-modal {
  display: none;
  position: fixed;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  z-index: 2000;
  background: rgba(0,0,0,0.6);

  & > .pdf-viewer-container {
    position: relative;
    width: 92%;
    max-width: 1200px;
    height: 90%;
    margin: 4% auto;
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
    display: flex;
    flex-direction: column;

    & > .pdf-viewer-close {
      position: absolute;
      top: 8px;
      right: 12px;
      z-index: 10;
      background: rgba(255,255,255,0.95);
      border: 1px solid #ccc;
      font-size: 22px;
      line-height: 1;
      cursor: pointer;
      color: #333;
      border-radius: 4px;
      padding: 2px 10px;
      transition: background 0.1s;

      &:hover {
        background: #fff;
        border-color: #999;
      }
    }

    .pdf-viewer-wrapper {
      flex: 1;
      overflow: hidden;
      border-radius: 6px;

      & > .pdf-viewer-iframe {
        width: 100%;
        height: 100%;
        border: 0;
      }
    }
  }
}

input[id="original-pdf"]:checked ~ .pdf-viewer-modal {
  display: block;
}

input[id="response-pdf"]:checked ~ .pdf-viewer-modal {
    display: block;
}