/* ============================================
   Combined style.css
   Sources: index, navigation, footer, home, menu,
            create, update, vote, result, delete,
            table, grid, az
   Duplicates removed, most complete rules kept
   ============================================ */

/* ---------- Base ---------- */
* {
  box-sizing: border-box;
  font-family: system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
  font-size: 16px;
}

body, html {
  background-color: #f3f4f7;
  margin: 0;
  padding: 0;
}

h1, h2, h3, h4, h5, h6 {
  margin: 0;
  padding: 0;
  color: #474b50;
}

/* ---------- Layout helpers ---------- */
.content {
  width: 1060px;
  margin: 0 auto;
}

.content h2 {
  margin: 0;
  padding: 25px 0 10px 0;
  font-size: 22px;
  font-weight: 600;
  color: #474b50;
}

.pad-top-1 { padding-top: 5px; }
.pad-top-2 { padding-top: 10px; }
.pad-top-3 { padding-top: 15px; }
.pad-top-4 { padding-top: 20px; }
.pad-top-5 { padding-top: 25px; }

/* ---------- Header / Navigation ---------- */
.header {
  background-color: #2c3441;
  height: 60px;
  width: 100%;
}

.header .wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  margin: 0 auto;
  width: 1060px;
  height: 100%;
}

.header .wrapper h1,
.header .wrapper a,
.header .wrapper label {
  display: inline-flex;
  align-items: center;
}

.header .wrapper h1 {
  font-size: 20px;
  padding: 0;
  margin: 0;
  color: #fff;
  font-weight: normal;
}

.header .wrapper label,
.header .wrapper input[type=checkbox] {
  display: none;
}

.header .wrapper label {
  cursor: pointer;
  position: relative;
  height: 40px;
  width: 50px;
  text-decoration: none;
  margin-right: 5px;
  border-radius: 5px;
}

.header .wrapper label::before,
.header .wrapper label::after {
  content: "";
  position: absolute;
  top: 14px;
  left: 0;
  right: 0;
  margin: 0 auto;
  width: 20px;
  height: 2px;
  background-color: #616b78;
}

.header .wrapper label::after {
  top: 26px;
}

.header .wrapper label:hover,
.header .wrapper label:active,
.header .wrapper input[type=checkbox]:checked ~ label {
  background-color: #242a35;
}

.header .wrapper label:hover::before,
.header .wrapper label:hover::after,
.header .wrapper label:active::before,
.header .wrapper label:active::after,
.header .wrapper input[type=checkbox]:checked ~ label::before,
.header .wrapper input[type=checkbox]:checked ~ label::after {
  background-color: #798493;
}

.header .wrapper .menu {
  display: flex;
  align-items: center;
}

.header .wrapper .menu a {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 32px;
  border-radius: 15px;
  padding: 0 14px;
  margin: 0 3px;
  text-decoration: none;
  color: #87919e;
  font-weight: 500;
  font-size: 16px;
  line-height: 16px;
}

.header .wrapper .menu a svg {
  fill: #87919e;
  margin: 2px 8px 0 0;
}

.header .wrapper .menu a.alt {
  color: #cdd4df;
}

.header .wrapper .menu a.alt svg {
  fill: #cdd4df;
}

.header .wrapper .menu a:hover,
.header .wrapper .menu a:active,
.header .wrapper .menu a.active {
  color: #eaebec;
  background-color: #242a35;
}

.header .wrapper .menu a:hover svg,
.header .wrapper .menu a:active svg,
.header .wrapper .menu a.active svg {
  fill: #eaebec;
}

.header .wrapper .menu a:last-child {
  margin-right: 0;
}

/* Header responsive */
@media screen and (max-width: 1060px) {
  .header .wrapper {
    width: 100%;
  }

  .header .wrapper h1 {
    font-size: 18px;
    padding: 15px;
  }

  .header .wrapper label {
    display: inline-flex;
  }

  .header .wrapper .menu {
    display: none;
    position: absolute;
    top: 100%;
    width: 100%;
    flex-flow: column;
    background-color: #282f3b;
    justify-items: flex-start;
    align-items: flex-start;
    padding: 10px;
  }

  .header .wrapper input[type=checkbox]:checked ~ .menu {
    display: flex;
  }

  .header .wrapper input[type=checkbox]:checked ~ .menu a {
    justify-content: flex-start;
    width: 100%;
    padding: 25px;
  }
}

/* ---------- Footer ---------- */
.footer {
  background-color: #2c3441;
  width: 100%;
  color: #fff;
  position: relative;
  margin-top: auto;
  flex-shrink: 0;
  box-shadow: 0 -1px 6px rgba(0, 0, 0, 0.05);
}

.footer .wrapper {
  width: 100%;
  max-width: 1060px;
  margin: 0 auto;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 15px;
  gap: 12px;
}

.footer .brand {
  display: inline-flex;
  align-items: center;
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
}

.footer .menu {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.footer .menu a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #cdd4df;
  text-decoration: none;
  padding: 6px 10px;
  border-radius: 8px;
  font-weight: 500;
  font-size: 14px;
}

.footer .menu a:hover,
.footer .menu a:focus {
  color: #eaebec;
  background-color: #242a35;
}

.footer .small {
  color: #9aa2ab;
  font-size: 13px;
  font-weight: 400;
}

@media screen and (max-width: 768px) {
  .footer .wrapper {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 14px 12px;
  }

  .footer .brand {
    margin-bottom: 6px;
  }

  .footer .menu {
    justify-content: center;
    gap: 8px;
  }
}

/* ---------- Forms (shared) ---------- */
.form {
  display: flex;
  flex-flow: column;
  width: 100%;
}

.form .form-label {
  display: block;
  padding: 20px 0 10px 0;
  font-weight: 500;
  font-size: 14px;
  color: #474b50;
}

.form .form-label span {
  color: #8c97a5;
  font-size: 14px;
}

.form .form-group {
  display: flex;
  position: relative;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  width: 100%;
}

.form .form-group .form-icon-left,
.form .form-group .form-icon-right {
  fill: #c1c6cb;
  width: 40px;
  position: absolute;
  transform: translateY(-50%);
  top: 50%;
  pointer-events: none;
}

.form .form-group .form-icon-left {
  left: 0;
}

.form .form-group .form-icon-left + .form-input {
  padding-left: 40px;
}

.form .form-group .form-icon-right {
  right: 0;
}

.form .form-group .form-icon-right + .form-input {
  padding-right: 40px;
}

.form .form-group:focus-within .form-icon-left {
  fill: #98a0a8;
}

.form .form-input,
.form .file-input {
  width: 100%;
  height: 43px;
  border: 1px solid #dee2e6;
  padding: 0 15px;
  border-radius: 4px;
  outline: 0;
  color: #000;
}

.form .form-input::placeholder,
.form .file-input::placeholder {
  color: #98a0a8;
}

.form .form-input:focus,
.form .file-input:focus {
  box-shadow: 0 0 0 3px #c7def7;
  border: 1px solid #75b3f1;
}

.form input[type=datetime-local] {
  font-size: 14px;
  max-width: 168px;
  padding: 0 12px;
}

.form .file-input {
  display: flex;
  align-items: center;
  padding: 7px;
  cursor: pointer;
}

.form .file-input .file-icon {
  display: flex;
  align-items: center;
  padding-right: 5px;
}

.form .file-input .file-icon svg {
  fill: #b4babf;
}

.form .file-input .file-name {
  font-size: 16px;
  color: #98a0a8;
  margin-left: 5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.form .file-input input {
  display: none;
}

.form .form-link {
  display: inline-flex;
  align-items: center;
  color: #2a77eb;
  font-weight: 500;
  text-decoration: none;
  font-size: 14px;
}

.form .form-link svg {
  fill: #2a77eb;
  margin: 0 2px 0 0;
}

.form .form-link:hover {
  color: #135ac5;
}

.form .multiselect {
  position: relative;
  display: flex;
  flex-flow: wrap;
  border: 1px solid #dee2e6;
  padding: 0 10px;
  margin: 0;
  border-radius: 4px;
}

.form .multiselect > .item {
  display: inline-flex;
  border: 1px solid #dee2e6;
  padding: 0 8px;
  height: 30px;
  margin: 5px 5px 0 0;
  font-size: 14px;
  justify-content: center;
  align-items: center;
}

.form .multiselect > .item .remove {
  font-style: normal;
  cursor: pointer;
  font-size: 19px;
  margin-right: 3px;
  margin-top: -4px;
  color: #b6bcce;
}

.form .multiselect > .item .remove:hover {
  color: #97a0ba;
}

.form .multiselect input {
  height: 41px;
  width: 80px;
  flex-grow: 1;
  padding: 15px 5px;
  margin: 0;
  outline: 0;
  border: 0;
}

.form .multiselect input:hover {
  border: 0;
}

.form .multiselect input::placeholder {
  color: #98a0a8;
}

.form .multiselect .list {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  flex-flow: column;
  background-color: #fff;
  box-shadow: 0px 0px 5px 1px rgba(0, 0, 0, 0.1);
  max-height: 100px;
  overflow-y: auto;
  z-index: 1000000000;
}

.form .multiselect .list span {
  display: flex;
  padding: 5px 7px;
  cursor: pointer;
  color: #000;
}

.form .multiselect .list span:hover {
  background-color: #fcfcfd;
}

.form .multiselect:focus {
  box-shadow: 0 0 0 3px #c7def7;
  border: 1px solid #75b3f1;
}

.form.form-small {
  max-width: 350px;
}

/* Messages */
.msg {
  font-size: 14px;
  font-weight: 500;
}

.msg.success {
  color: #0da74d;
}

.msg.success .form-link {
  color: #0b6430;
}

.msg.success .form-link:hover {
  color: #06361a;
}

.msg.error {
  color: #c21e13;
}

.msg.error .form-link {
  color: #74160b;
}

.msg.error .form-link:hover {
  color: #450d07;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  appearance: none;
  cursor: pointer;
  border: 0;
  background: #354555;
  color: #FFFFFF;
  padding: 0 14px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 4px;
  height: 35px;
  box-shadow: 0px 0px 6px 1px rgba(45, 54, 68, 0.1);
}

.btn:hover {
  background: #2f3d4c;
}

.btn.blue {
  background: #2873cf;
}

.btn.blue:hover {
  background: #266cc2;
}

.btn.green {
  background: #4ab46d;
}

.btn.green:hover {
  background: #46a966;
}

.btn.red {
  background: #be4949;
}

.btn.red:hover {
  background: #b74141;
}

.btn.alt {
  color: #75797e;
  border: 1px solid #d4dbde;
  box-shadow: 0px 0px 3px 1px rgba(0, 0, 0, 0.03);
  background: #f1f3f4;
}

.btn.alt:hover {
  background: #eef1f2;
}

.btn.disabled {
  pointer-events: none;
  cursor: not-allowed;
  background: #b1b3b4;
}

.btn.disabled:hover {
  background: #a9abad;
}

.btn.small {
  padding: 8px 12px;
  font-size: 12px;
}

.btn .loader,
.btn .loader::after {
  width: 15px;
  height: 15px;
}

.btn .loader {
  margin: 0;
  border-top: 2px solid rgba(255, 255, 255, 0.4);
  border-right: 2px solid rgba(255, 255, 255, 0.4);
  border-bottom: 2px solid rgba(255, 255, 255, 0.4);
  border-left: 2px solid rgba(255, 255, 255, 0.9);
}

/* ---------- Page title (home / index) ---------- */
.content .page-title {
  display: flex;
  align-items: center;
  padding: 25px 0 10px 0;
}

.content .page-title .icon {
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #3dc4ad;
  color: #FFFFFF;
  margin-right: 20px;
  border-radius: 50%;
  height: 55px;
  width: 55px;
  min-height: 55px;
  min-width: 55px;
}

.content .page-title .icon svg {
  fill: #fff;
}

.content .page-title .wrap {
  flex: 1;
}

.content .page-title h2 {
  margin: 0;
  padding: 0 0 7px 0;
  font-size: 20px;
  font-weight: 600;
  color: #53585e;
}

.content .page-title p {
  margin: 0;
  padding: 0;
  font-size: 14px;
  color: #777e86;
}

.content .page-title .actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.content .page-title .actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  height: 36px;
  width: 40px;
  border-radius: 5px;
  margin-left: 2px;
}

.content .page-title .actions a svg {
  fill: #adb1b6;
}

.content .page-title .actions a.selected,
.content .page-title .actions a:hover {
  background-color: #d6d9dd;
}

.content .page-title .actions a.selected svg,
.content .page-title .actions a:hover svg {
  fill: #5f646b;
}

/* ---------- Home / list tables ---------- */
.home .create-poll {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  appearance: none;
  cursor: pointer;
  border: 0;
  background: #2873cf;
  color: #FFFFFF;
  padding: 0 14px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 4px;
  height: 35px;
  margin-top: 10px;
  box-shadow: 0px 0px 6px 1px rgba(45, 54, 68, 0.1);
}

.home .create-poll:hover {
  background: #266cc2;
}

.home table {
  width: 100%;
  margin-top: 30px;
  border-collapse: collapse;
}

.home table thead {
  border-bottom: 1px solid #ebedf0;
}

.home table thead td {
  padding: 15px;
  font-weight: 500;
  color: #78797b;
  font-size: 14px;
}

.home table tbody tr {
  border-bottom: 1px solid #ebedf0;
}

.home table tbody tr:nth-child(odd) {
  background-color: #fafafc;
}

.home table tbody tr td {
  padding: 15px;
}

.home table tbody tr td:nth-child(1) {
  color: #a8aaad;
}

.home table tbody tr td .poll-answer {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 10px;
  background-color: #f8eabd;
  color: #c99f15;
  border-radius: 15px;
  margin-right: 4px;
  font-size: 12px;
  font-weight: 500;
}

.home table tbody tr td.actions {
  padding: 8px;
  text-align: right;
}

.home table tbody tr td.actions .view,
.home table tbody tr td.actions .trash,
.home table tbody tr td.actions .edit {
  display: inline-flex;
  text-align: right;
  text-decoration: none;
  color: #FFFFFF;
  padding: 7px 9px;
  border-radius: 5px;
  margin-left: 3px;
}

.home table tbody tr td.actions .view svg,
.home table tbody tr td.actions .trash svg,
.home table tbody tr td.actions .edit svg {
  fill: #fff;
}

.home table tbody tr td.actions .edit {
  background-color: #37afb7;
}

.home table tbody tr td.actions .edit:hover {
  background-color: #319ca3;
}

.home table tbody tr td.actions .trash {
  background-color: #b73737;
}

.home table tbody tr td.actions .trash:hover {
  background-color: #a33131;
}

.home table tbody tr td.actions .view {
  background-color: #37b770;
}

.home table tbody tr td.actions .view:hover {
  background-color: #31a364;
}

/* Poll categories */
.poll-categories {
  display: flex;
  flex-flow: wrap;
  gap: 5px;
}

.poll-categories .poll-category {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: #d4f3ed;
  color: #24a784;
  padding: 4px 8px;
  border-radius: 15px;
  font-size: 12px;
  font-weight: 500;
}

.poll-categories .poll-category.alt {
  background-color: rgba(99, 114, 146, 0.15);
  color: #8191a3;
}

/* Poll list table (alternative) */
.poll-list-table {
  overflow-x: auto;
}

.poll-list-table.block {
  padding: 30px 40px 40px;
}

.poll-list-table table {
  width: 100%;
  border-collapse: collapse;
}

.poll-list-table table thead {
  border-bottom: 1px solid #edeff1;
}

.poll-list-table table thead th {
  text-align: left;
  padding: 10px 10px 20px 10px;
  font-weight: 500;
  color: #929394;
  font-size: 14px;
}

.poll-list-table table thead th:last-child {
  text-align: center;
}

.poll-list-table table tbody tr:nth-child(even) {
  background-color: #f9fafb;
  border-radius: 15px;
}

.poll-list-table table tbody tr td {
  padding: 20px 10px;
}

.poll-list-table table tbody tr td .title {
  font-weight: 500;
  color: #5f646b;
  font-size: 14px;
}

.poll-list-table table tbody tr td.alt {
  color: #929394;
}

.poll-list-table table tbody tr td.actions {
  padding: 8px;
  text-align: right;
}

.poll-list-table table tbody tr td.actions .view,
.poll-list-table table tbody tr td.actions .update,
.poll-list-table table tbody tr td.actions .vote {
  display: inline-flex;
  text-align: right;
  text-decoration: none;
  color: #FFFFFF;
  padding: 6px 8px;
  border-radius: 4px;
}

.poll-list-table table tbody tr td.actions .view svg,
.poll-list-table table tbody tr td.actions .update svg,
.poll-list-table table tbody tr td.actions .vote svg {
  fill: #fff;
}

.poll-list-table table tbody tr td.actions .update {
  background-color: #a0a6af;
}

.poll-list-table table tbody tr td.actions .update:hover {
  background-color: #9299a3;
}

.poll-list-table table tbody tr td.actions .view {
  background-color: #407fd2;
  margin: 0 2px;
}

.poll-list-table table tbody tr td.actions .view:hover {
  background-color: #2f72c9;
}

.poll-list-table table tbody tr td.actions .vote {
  background-color: #1EC497;
}

.poll-list-table table tbody tr td.actions .vote:hover {
  background-color: #1bae86;
}

/* ---------- Create / Update forms ---------- */
.update form {
  padding: 15px 0;
  display: flex;
  flex-flow: column;
  width: 600px;
}

.update form label {
  display: inline-flex;
  width: 100%;
  padding: 10px 0;
  margin-right: 25px;
  font-weight: 500;
  font-size: 14px;
  color: #474b50;
}

.update form input,
.update form textarea {
  padding: 10px;
  width: 100%;
  margin-right: 25px;
  margin-bottom: 15px;
  border: 1px solid #dcdee0;
  border-radius: 5px;
}

.update form input::placeholder,
.update form textarea::placeholder {
  color: #999a9e;
}

.update form textarea {
  height: 90px;
  resize: vertical;
}

.update form button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  appearance: none;
  cursor: pointer;
  border: 0;
  background: #2873cf;
  color: #FFFFFF;
  padding: 0 16px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 4px;
  height: 35px;
  white-space: nowrap;
  margin-top: 10px;
  box-shadow: 0px 0px 6px 1px rgba(45, 54, 68, 0.1);
}

.update form button:hover {
  background: #266cc2;
}

.answer-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.answer-row input {
  flex: 1;
  margin-bottom: 0 !important;
}

.answer-row .remove-answer {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  margin: 0;
  border: none;
  border-radius: 4px;
  background: #be4949;
  color: #fff;
  font-size: 18px;
  font-weight: bold;
  cursor: pointer;
  flex-shrink: 0;
}

.answer-row .remove-answer:hover {
  background: #b74141;
}

.form-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.update form button.add-answer {
  background: #6c757d;
}

.update form button.add-answer:hover {
  background: #5a6268;
}

/* Extra poll fields grid */
.fields-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 20px;
}

.fields-grid .field {
  display: flex;
  flex-flow: column;
}

.fields-grid .field label,
.field.wide label {
  padding: 10px 0 6px 0;
  font-size: 13px;
  font-weight: 600;
  color: #707985;
}

.fields-grid .field input {
  margin-bottom: 0;
}

.field.wide {
  display: flex;
  flex-flow: column;
}

@media screen and (max-width: 700px) {
  .fields-grid {
    grid-template-columns: 1fr;
  }
}

@media screen and (max-width: 1060px) {
  .update form {
    width: 100%;
    flex-flow: column;
  }

  .update form select,
  .update form input {
    margin: 10px 0;
  }

  .update form div {
    display: flex;
    flex-flow: column;
  }
}

/* ---------- Vote page ---------- */
.poll-vote h1 {
  font-size: 20px;
  padding: 15px 0;
  margin: 0;
  font-weight: 500;
  color: #474b50;
}

.poll-vote .desc {
  color: #707985;
  font-size: 14px;
  padding-bottom: 15px;
  margin: 0;
}

.poll-vote form {
  display: flex;
  flex-flow: column;
}

.poll-vote form label {
  display: flex;
  align-items: center;
  padding: 10px 7px;
  margin-bottom: 10px;
  border: 1px solid #dee2e6;
  border-radius: 4px;
  max-width: 300px;
  font-weight: 500;
  cursor: pointer;
  color: #707985;
}

.poll-vote form label:has(input[type=radio]:checked) {
  border: 1px solid #1EC497;
}

.poll-vote form input[type=radio] {
  appearance: none;
  width: 18px;
  height: 18px;
  border: 2px solid #dee2e6;
  border-radius: 50%;
  cursor: pointer;
  outline: none;
  margin-right: 12px;
  transform: scale(1.1);
}

.poll-vote form input[type=radio]:checked {
  border: 2px solid #1EC497;
}

.poll-vote form input[type=radio]:checked::before {
  content: "";
  display: block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: #1EC497;
  margin: 2px;
}

.poll-vote form button,
.poll-vote form a,
.poll-vote form .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  appearance: none;
  cursor: pointer;
  border: 0;
  background: #2873cf;
  color: #FFFFFF;
  padding: 0 14px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 4px;
  height: 35px;
  width: 120px;
  margin-top: 10px;
  box-shadow: 0px 0px 6px 1px rgba(45, 54, 68, 0.1);
}

.poll-vote form button:hover,
.poll-vote form a:hover,
.poll-vote form .btn:hover {
  background: #266cc2;
}

.poll-vote form a {
  text-align: center;
  background-color: #37afb7;
  margin-left: 6px;
}

.poll-vote form a:hover {
  background-color: #319ca3;
}

.poll-vote form .add-custom-answer {
  margin-bottom: 15px;
}

.poll-vote form #add-custom-toggle {
  width: 300px;
  max-width: 100%;
  height: 38px;
  background: #f1f3f4;
  color: #474b50;
  border: 1px solid #dee2e6;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  box-shadow: none;
  margin-top: 5px;
}

.poll-vote form #add-custom-toggle:hover {
  background: #e8eaed;
  border-color: #c1c6cb;
}

.poll-vote form #custom-answer-input {
  width: 300px !important;
  max-width: 100%;
  height: 38px;
  padding: 0 12px;
  margin-top: 8px;
  border: 1px solid #dee2e6;
  border-radius: 4px;
  font-size: 14px;
}

.content .block {
  box-shadow: 0px 0px 7px 1px rgba(45, 54, 68, 0.05);
  margin: 10px 0;
  padding: 15px;
  border-radius: 5px;
  background-color: #fff;
}

/* Two-column vote layout */
.poll-columns {
  display: flex;
  gap: 40px;
  align-items: flex-start;
  padding: 15px 0;
}

.poll-col-vote {
  flex: 0 0 340px;
}

.poll-col-vote form {
  padding: 0;
}

.poll-col-meta {
  flex: 1;
  min-width: 0;
  padding-left: 30px;
  border-left: 1px solid #e9eaec;
}

@media screen and (max-width: 800px) {
  .poll-columns {
    flex-flow: column;
  }

  .poll-col-meta {
    border-left: none;
    border-top: 1px solid #e9eaec;
    padding-left: 0;
    padding-top: 20px;
  }
}

/* Meta tags / list */
.meta-tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 12px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 20px;
  background: #eaf1fb;
  color: #2873cf;
}

.meta-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
  margin: 0;
}

.meta-row {
  background: #f7f8fa;
  border: 1px solid #e9eaec;
  border-radius: 8px;
  padding: 10px 14px;
}

.meta-row dt {
  margin: 0 0 4px 0;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #9a9ea3;
}

.meta-row dd {
  margin: 0;
  font-size: 14px;
  font-weight: 500;
  color: #33373b;
  line-height: 1.4;
}

.meta-row.wide {
  grid-column: 1 / -1;
}

/* ---------- Result page ---------- */
.poll-result .wrapper {
  width: 100%;
  max-width: 600px;
}

.poll-result .wrapper .poll-question {
  box-shadow: 0px 0px 7px 1px rgba(45, 54, 68, 0.05);
  margin: 25px 0;
  padding: 25px;
  border-radius: 5px;
  background-color: #fff;
}

.poll-result .wrapper .poll-question p {
  margin: 0;
  padding: 0 0 10px;
  font-size: 16px;
  font-weight: 500;
  color: #707985;
  display: flex;
  justify-content: space-between;
}

.poll-result .wrapper .poll-question p span {
  color: #8c97a5;
  font-size: 14px;
  font-weight: normal;
}

.poll-result .wrapper .poll-question .result-bar-wrapper {
  background-color: #f4f5f7;
  border-radius: 15px;
  overflow: hidden;
}

.poll-result .wrapper .poll-question .result-bar-wrapper .result-bar {
  display: flex;
  height: 24px;
  min-width: 35px;
  background-color: #2bb86c;
  font-size: 12px;
  font-weight: 500;
  color: #FFFFFF;
  justify-content: center;
  align-items: center;
}

/* ---------- Delete page ---------- */
.delete .yesno {
  display: flex;
}

.delete .yesno a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  appearance: none;
  cursor: pointer;
  border: 0;
  background: #2873cf;
  color: #FFFFFF;
  padding: 0 14px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 4px;
  height: 35px;
  width: 70px;
  margin: 10px 10px 10px 0;
  box-shadow: 0px 0px 6px 1px rgba(45, 54, 68, 0.1);
}

.delete .yesno a:hover {
  background: #266cc2;
}

/* ---------- Card / grid table (poll cards) ---------- */
.poll-table {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 20px;
  margin: 20px 0;
}

.poll-card {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: box-shadow 0.3s ease;
}

.poll-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.poll-card .poll-title {
  margin: 0 0 15px 0;
  font-size: 18px;
  font-weight: 600;
  color: #333;
  word-break: break-word;
}

.poll-answers {
  margin: 15px 0;
}

.poll-card .poll-question {
  margin-bottom: 12px;
}

.poll-card .poll-txt {
  margin: 8px 0;
  font-size: 14px;
  color: #555;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.poll-card .poll-txt span {
  font-size: 12px;
  color: #999;
  font-weight: 500;
}

.result-bar-container {
  background: #f5f5f5;
  border-radius: 4px;
  height: 24px;
  overflow: hidden;
  margin: 5px 0;
}

.result-bar {
  background: linear-gradient(90deg, #4CAF50, #45a049);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 12px;
  font-weight: bold;
  min-width: 30px;
  transition: width 0.3s ease;
}

.poll-card .btns {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 15px 0 10px 0;
  padding-top: 10px;
  border-top: 1px solid #f0f0f0;
}

.poll-card .num-votes {
  font-size: 12px;
  color: #999;
  font-weight: 500;
}

.poll-card .btn {
  background: #2196F3;
  color: white;
  padding: 8px 16px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  text-decoration: none;
  transition: background 0.3s ease;
}

.poll-card .btn:hover {
  background: #1976D2;
}

.poll-actions {
  display: flex;
  gap: 12px;
  padding-top: 10px;
  border-top: 1px solid #f0f0f0;
  flex-wrap: wrap;
}

.action-link {
  font-size: 13px;
  color: #2196F3;
  text-decoration: none;
  transition: color 0.3s ease;
}

.action-link:hover {
  color: #1976D2;
  text-decoration: underline;
}

@media (max-width: 768px) {
  .poll-table {
    grid-template-columns: 1fr;
  }
}

/* ---------- Facebook-style poll (grid.css) ---------- */
.fb-new-polls-container {
  max-width: 560px;
  margin: 0 auto;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.fb-new-poll {
  background: #fff;
  border-radius: 12px;
  padding: 16px 16px 12px;
  margin-bottom: 16px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  border: 1px solid #e4e6eb;
}

.fb-new-poll-title {
  font-size: 17px;
  font-weight: 600;
  color: #050505;
  line-height: 1.35;
  margin-bottom: 12px;
  word-wrap: break-word;
}

.fb-new-poll-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 8px;
}

.fb-new-option {
  position: relative;
  display: flex;
  align-items: center;
  background: #f0f2f5;
  border-radius: 8px;
  min-height: 44px;
  overflow: hidden;
  cursor: pointer;
  transition: background 0.15s ease;
}

.fb-new-option:hover {
  background: #e4e6eb;
}

.fb-new-option-bar {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  background: #e7f3ff;
  border-radius: 8px;
  z-index: 0;
  transition: width 0.3s ease;
}

.fb-new-option.selected .fb-new-option-bar,
.fb-new-option.leading .fb-new-option-bar {
  background: #cce4ff;
}

.fb-new-option-label {
  display: flex;
  align-items: center;
  flex: 1;
  padding: 10px 12px;
  z-index: 1;
  cursor: pointer;
  margin: 0;
  gap: 10px;
  min-width: 0;
}

.fb-new-checkbox {
  width: 20px;
  height: 20px;
  min-width: 20px;
  border: 2px solid #8a8d91;
  border-radius: 4px;
  appearance: none;
  -webkit-appearance: none;
  background: #fff;
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
  margin: 0;
}

.fb-new-checkbox:checked,
.fb-new-option.selected .fb-new-checkbox {
  background: #1877f2;
  border-color: #1877f2;
}

.fb-new-checkbox:checked::after,
.fb-new-option.selected .fb-new-checkbox::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 2px;
  width: 5px;
  height: 10px;
  border: solid #fff;
  border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg);
}

.fb-new-option-text {
  font-size: 15px;
  color: #050505;
  font-weight: 500;
  line-height: 1.3;
  word-break: break-word;
  flex: 1;
}

.fb-new-option-meta {
  display: block;
  font-size: 12px;
  color: #65676b;
  font-weight: 400;
  margin-bottom: 1px;
}

.fb-new-option-right {
  display: flex;
  align-items: center;
  gap: 6px;
  padding-right: 12px;
  z-index: 1;
  flex-shrink: 0;
  margin-left: auto;
}

.fb-new-option-percent {
  font-size: 15px;
  font-weight: 600;
  color: #050505;
  white-space: nowrap;
}

.fb-new-option-percent::after {
  content: " ›";
  font-weight: 400;
  color: #65676b;
}

.fb-new-delete-btn {
  color: #8a8d91;
  font-size: 18px;
  text-decoration: none;
  line-height: 1;
  padding: 2px 4px;
  border-radius: 4px;
  display: none;
}

.fb-new-option:hover .fb-new-delete-btn {
  display: inline;
}

.fb-new-delete-btn:hover {
  color: #e41e3f;
  background: rgba(228, 30, 63, 0.1);
}

.fb-new-add-option {
  margin-top: 4px;
  margin-bottom: 8px;
}

.fb-new-add-input {
  width: 100%;
  padding: 12px 14px;
  border: none;
  border-radius: 8px;
  background: #f0f2f5;
  font-size: 15px;
  color: #050505;
  outline: none;
  box-sizing: border-box;
}

.fb-new-add-input::placeholder {
  color: #8a8d91;
}

.fb-new-add-input:disabled {
  cursor: default;
  opacity: 1;
}

.fb-new-poll-stats {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 0 8px;
  font-size: 13px;
  color: #65676b;
}

.fb-new-total-votes {
  font-weight: 400;
}

.fb-new-added-info {
  font-weight: 400;
}

.fb-new-poll-actions {
  display: flex;
  gap: 8px;
  border-top: 1px solid #e4e6eb;
  padding-top: 10px;
  margin-top: 4px;
}

.fb-new-action-btn {
  flex: 1;
  text-align: center;
  padding: 8px 12px;
  border-radius: 6px;
  background: #e4e6eb;
  color: #050505;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s ease;
  border: none;
  cursor: pointer;
}

.fb-new-action-btn:hover {
  background: #d8dadf;
  text-decoration: none;
  color: #050505;
}

.fb-new-delete-action {
  color: #e41e3f !important;
}

.fb-new-delete-action:hover {
  background: #fde8eb !important;
  color: #e41e3f !important;
}

.fb-new-option.leading {
  background: #e7f3ff;
}

.fb-new-option.leading:hover {
  background: #d0e7ff;
}

.fb-new-option.leading .fb-new-option-bar {
  background: #cce4ff;
}

/* ---------- A-Z list ---------- */
.az-list {
  margin: 25px 0;
}

.az-list .letters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin-bottom: 12px;
  padding: 0;
  list-style: none;
}

.az-list .letters li a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 34px;
  padding: 0 8px;
  border-radius: 4px;
  background: #f1f3f4;
  color: #474b50;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  border: 1px solid #dee2e6;
}

.az-list .letters li a:hover {
  background: #e8eaed;
}

.az-list .letters li a.active {
  background: #2873cf;
  color: #fff;
  border-color: #2873cf;
}

.az-list .az-results {
  margin-top: 20px;
}

.az-list .az-results h3 {
  font-size: 16px;
  color: #707985;
  margin-bottom: 15px;
}

.az-list .az-item {
  display: flex;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid #edeff1;
}

.az-list .az-item a {
  color: #474b50;
  text-decoration: none;
  font-weight: 500;
}

.az-list .az-item a:hover {
  color: #2873cf;
}

/* =========================================================
   მობილურის ადაპტაცია (Responsive CSS Only)
   ინარჩუნებს დესკტოპის 100% ორიგინალ დიზაინს
   ========================================================= */

@media (max-width: 991px) {
    .navbar .container {
        padding-left: 15px;
        padding-right: 15px;
    }
    .navbar-collapse {
        background-color: #2c3441;
        padding: 15px;
        border-radius: 8px;
        margin-top: 10px;
    }
}

@media (max-width: 768px) {
    /* კონტეინერის შიდა დაშორება */
    .content, .container {
        padding-left: 12px !important;
        padding-right: 12px !important;
    }

    /* ანბანის ჩამონათვალი (az.php) */
    .az-list .letters {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 4px;
        padding: 0;
    }
    .az-list .letters li {
        margin: 0;
    }
    .az-list .letters li a {
        padding: 5px 8px;
        font-size: 14px;
    }

    /* გვერდის სათაურის ბლოკი (page-title.php) */
    .d-flex.align-items-center.justify-content-between.flex-wrap {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 15px;
    }

    /* მთავარი ცხრილის (index.php) მობილურის ვერსია */
    .home .block {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .home table.table {
        min-width: 550px; /* არ შეიკუმშოს ტექსტები */
    }

    /* ხმის მიცემის გვერდი (vote.php) */
    .poll-columns {
        flex-direction: column !important;
        display: flex !important;
        gap: 20px;
    }
    .poll-col-vote, .poll-col-meta {
        width: 100% !important;
        max-width: 100% !important;
    }

    /* ფორმები და ინფუტები (update.php, create.php) */
    .fields-grid {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }
    .fields-grid .field {
        width: 100% !important;
    }
    .update form input[type="text"],
    .update form textarea,
    .create form input[type="text"] {
        width: 100% !important;
        box-sizing: border-box;
    }
    .form-actions {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
    }
    .form-actions button {
        flex: 1 1 100%;
    }

    /* ბარათების ბადე (table.php, grid.php) */
    .poll-table, .fb-new-polls-container {
        display: flex;
        flex-direction: column;
        gap: 15px;
    }
    .poll-card, .fb-new-poll {
        width: 100% !important;
        box-sizing: border-box;
    }
}

/* =========================================================
   მობილურის ადაპტაცია (მხოლოდ ტელეფონისთვის - Max 768px)
   ========================================================= */

@media (max-width: 768px) {
    /* 1. გვერდის ჰორიზონტალური სქროლის პრევენცია */
    html, body {
        overflow-x: hidden !important;
        width: 100% !important;
    }

    .content, .wrapper, .container, .block {
        width: 100% !important;
        max-width: 100% !important;
        padding-left: 10px !important;
        padding-right: 10px !important;
        box-sizing: border-box !important;
    }

    /* 2. მთავარი ცხრილი მობილურზე გარდაიქმნება ბარათებად */
    .block table {
        display: block !important;
        width: 100% !important;
    }

    .block table thead {
        display: none !important;
    }

    .block table tbody,
    .block table tr {
        display: block !important;
        width: 100% !important;
    }

.block table tr {
        margin-bottom: 12px !important;
        background: #ffffff !important; /* მუქის ნაცვლად თეთრი ფონი */
        border: 1px solid #ebedf0 !important; /* მსუბუქი კანტი */
        border-radius: 8px !important;
        padding: 12px !important;
        box-sizing: border-box !important;
    }

    .block table td {
        display: block !important;
        width: 100% !important;
        padding: 4px 0 !important;
        border: none !important;
        box-sizing: border-box !important;
    }

    /* 3. ხმის მიცემის გვერდის (vote.php) სვეტების ჩაშლა 1 სვეტად */
    .poll-columns {
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
    }

    .poll-col-vote, 
    .poll-col-meta {
        width: 100% !important;
        max-width: 100% !important;
        float: none !important;
    }

    /* 4. ანბანის ღილაკების (az.php) კომპაქტური განლაგება */
    .az-list .letters {
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 4px !important;
        justify-content: center !important;
    }

    /* 5. ფორმების და ინფუტების გასწორება */
    .fields-grid,
    .update form,
    .create form {
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
    }

    .update form input[type="text"],
    .update form textarea,
    .create form input[type="text"] {
        width: 100% !important;
        box-sizing: border-box !important;
    }
}