body {
    font-family: Arial, Helvetica, sans-serif;
    background: #f8f8fa;
    margin: 0;
    color: #222;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 1000px;
    margin: 60px auto 30px auto;
    padding: 30px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px #ddd;
}

h1, h2 {
    color: #0074d9;
    margin-bottom: 18px;
}

.navbar {
    background: #0074d9;
    color: white;
    padding: 15px 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.nav-brand {
    font-size: 1.2em;
    font-weight: bold;
}


.nav-brand a {
    color: white;
    text-decoration: none;
}

.nav-links {
    align-items: center;
}

.nav-links a {
    color: white;
    text-decoration: none;
    font-weight: normal;
    padding: 8px 12px;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.nav-links a:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.navbar a {
    color: white;
    text-decoration: none;
    font-weight: bold;
}

form {
    margin: 18px 0;
}

input, button, select {
    font-size: 1em;
    margin-bottom: 10px;
    padding: 7px;
    border-radius: 4px;
    border: 1px solid #ccc;
}

button {
    background: #0074d9;
    color: white;
    border: none;
    font-weight: bold;
    cursor: pointer;
}

button:hover {
    background: #005fa3;
}

.btn-delete {
    background: #dc3545;
}

.btn-delete:hover {
    background: #c82333;
}

.alert-error {
    background: #ffd3d8;
    color: #a00;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 18px;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 18px;
}

main {
    min-height: 65vh;
    flex: 1;
}

footer {
    background: #fafafa;
    text-align: center;
    height: 50px;
    font-size: 0.95em;
    color: #999;
}

ul {
    padding-left: 20px;
}

code {
    background: #f0f0f0;
    padding: 2px 6px;
    border-radius: 4px;
}

.tracking-code {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 5px;
    border-left: 4px solid #0074d9;
    margin: 15px 0;
}

.tracking-code code {
    display: inline-block;
    margin-right: 10px;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

th, td {
    padding: 10px 8px;
    border-bottom: 1px solid #ddd;
    text-align: left;
}

th {
    background: #f8f9fa;
    font-weight: bold;
}

th:first-child, td:first-child {
    width: 40px;
    text-align: center;
}

.table-controls {
    margin: 15px 0;
}

.table-controls button {
    margin-right: 10px;
}

input[type="checkbox"] {
    margin: 0;
}

section {
    margin-bottom: 40px;
}

/* Delete button */
/* From Uiverse.io by cssbuttons-io */ 
.delete-btn {
  width: 150px;
  height: 40px;
  cursor: pointer;
  display: flex;
  align-items: center;
  background: #e62222;
  border: none;
  border-radius: 5px;
  box-shadow: 1px 1px 3px rgba(0,0,0,0.15);
}

.delete-btn, 
.delete-btn span {
  transition: 200ms;
}

.delete-btn .text {
  transform: translateX(35px);
  color: white;
  font-weight: bold;
}

.delete-btn .icon {
  position: absolute;
  border-left: 1px solid #c41b1b;
  transform: translateX(110px);
  height: 40px;
  width: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.delete-btn svg {
  width: 15px;
  fill: #eee;
}

.delete-btn:focus {
  outline: none;
}

.delete-btn:active .icon svg {
  transform: scale(0.8);
}

.delete-btn:hover {
  background: #c41b1b; /* trochu tmavší červená */
}


/* Back Button */

/* From Uiverse.io by Jedi-hongbin */ 
.back-btn {
 display: flex;
 height: 3em;
 width: 100px;
 align-items: center;
 justify-content: center;
 background-color: #eeeeee4b;
 border-radius: 3px;
 letter-spacing: 1px;
 transition: all 0.2s linear;
 cursor: pointer;
 border: none;
 background: #0078D4;
}

.back-btn > svg {
 margin-right: 5px;
 margin-left: 5px;
 font-size: 20px;
 transition: all 0.4s ease-in;
 color: white;
}


/* Copy Button */

.copy-btn {
  width: 120px;
  height: 35px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  border: none;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.164);
  cursor: pointer;
  font-size: 14px;
}
.copy-btn .text {
  width: 99%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  background-color: #0078D4;
}
.copy-btn .svgIcon {
  width: 20%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}
.copy-btn:hover .text {
  background-color: #005a9e;
}
.copy-btn:hover .svgIcon {
}

/* Add URL Button Styles */

.url-form {
    margin: 20px 0;
}

.url-input-container {
    display: flex;
    align-items: center;
    background-color: #f5f5f5;
    border: 2px solid #000;
    border-radius: 25px;
    padding: 0 0 0 12px; /* pouze levý padding */
    max-width: 400px;
    gap: 12px;
    height: 40px;
}

.url-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.url-input {
    flex: 1;
    border: none;
    background: transparent;
    outline: none;
    font-size: 14px;
    color: #333;
    margin: 0;
    padding: 0;
}

.url-input::placeholder {
    color: #888;
    font-size: 14px;
}

.add-btn {
    background-color: #fff4b8;
    color: #333;
    border: none;
    border-radius: 18px;
    padding: 6px 16px;
    font-weight: bold;
    font-size: 12px;
    cursor: pointer;
    flex-shrink: 0;
    transition: background-color 0.2s ease;
    height: 40px;
    margin-bottom: 0px !important;
}

.add-btn:hover {
    background-color: #c0ca33;
}

/*MONITOR*/

.stats-table-wrapper {
    max-width: 1150px;
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 8px 32px rgba(99,115,223,0.14), 0 1.5px 6px #ecf1fb;
    padding: 0 0 10px 0;
}
.stats-table-fixed {
    width: 100%;
    min-width: 850px;
    border-collapse: separate;
    border-spacing: 0;
    table-layout: fixed;
    margin: 0px !important;
}
.stats-table-fixed thead th {
    background: #6374df;
    color: #fff;
    font-size: 1.07em;
    font-weight: 600;
    padding: 16px 10px;
    text-align: center;             /* VŠE NA STŘED */
    border: none;
    white-space: normal;
}
.stats-table-fixed th, .stats-table-fixed td {
    width: 14.2%;
    text-align: center;             /* VŠE NA STŘED */
    vertical-align: middle;
}
.stats-table-fixed th:first-child { border-radius: 15px 0 0 0; }
.stats-table-fixed th:last-child  { border-radius: 0 15px 0 0; }
.stats-table-fixed td {
    padding: 13px 10px;
    font-size: 1.01em;
    white-space: nowrap;
    border: none;
    text-align: center;             /* VŠE NA STŘED */
}
.stats-table-fixed tbody {
    display: block;
    max-height: 480px;
    overflow-y: auto;
    width: 100%;
}
.stats-table-fixed thead, .stats-table-fixed tr { display: table; width: 100%; table-layout: fixed; }
.stats-table-fixed tbody tr:nth-child(even) td { background: #f4f6fb; }
.stats-table-fixed tbody tr td { background: #fff; }
.stats-table-fixed tbody tr:nth-child(even) td { background: #f7f8ff; }
.stats-table-fixed tbody::-webkit-scrollbar { width: 10px; background: #eaeffd; border-radius: 6px;}
.stats-table-fixed tbody::-webkit-scrollbar-thumb { background: #c7cff0; border-radius: 6px; }

/*STAT GROUPS*/
.stats-flex-row { display: flex; gap: 22px; margin-bottom: 12px; }
.stats-box {
    background: #f5faff; border-radius: 9px; padding: 18px 22px;
    box-shadow: 0 2px 8px #e0edfa;
    flex: 1 1 0; min-width: 120px; text-align: center;
}
.stats-groups { margin-top: 14px; }
.stats-label { color: #1873d8; font-weight: 600; margin-bottom: 6px; }
.stats-value { color: #123070; font-size: 1.3em; font-weight: bold; }
.stats-single { display: flex; justify-content: center; gap: 32px; }

/* Pouze pro tabulku s class="table-sites" */
.table-sites th:nth-child(1),
.table-sites th:nth-child(2),
.table-sites td:nth-child(1),
.table-sites td:nth-child(2) {
    padding-left: 8px;
    padding-right: 8px;
}

.table-sites td:nth-child(2) {
    /* Těsné k checkboxu */
    padding-left: 0;
}

/* Pokud chceš ještě menší mezeru mezi boxem a URL, zmenši i šířku prvního sloupce: */
.table-sites th:nth-child(1),
.table-sites td:nth-child(1) {
    width: 38px;
    min-width: 38px;
    max-width: 38px;
}

.table-sites th:nth-child(2),
.table-sites td:nth-child(2) {
    width: 270px;
    min-width: 200px;
    max-width: 460px;
    padding-left: 18px;
    padding-right: 18px;
    text-align: left;
    white-space: nowrap;
}

/* Centrovat obsah posledního sloupce */
.table-sites th:last-child,
.table-sites td:last-child {
    text-align: center;
    vertical-align: middle;
}

/* Případně pokud máš více elementů v .action-buttons, přidej zarovnání */
.table-sites .action-buttons {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
}

/* Mírně zvětši mezeru mezi URL a dalšími buňkami (Visitors, ...) */
.table-sites th:nth-child(3),
.table-sites td:nth-child(3) {
    padding-left: 14px;
}
/* (Volitelné - pro mobil i počítač) */
@media (max-width: 700px) {
    .table-sites th,
    .table-sites td {
        padding-left: 5px;
        padding-right: 5px;
    }
}


/* Modrá barva pro všechny stavy odkazu */
.url-link:link,
.url-link:visited,
.url-link:hover,
.url-link:active {
    color: #0078D4;
    text-decoration: none; /* Odstraňuje podtržení, můžeš změnit podle sebe */
}

.url-link:hover {
    text-decoration: underline; /* Podtržení při hoveru jako vizuální indikace */
}
.login-icon {
    display: flex;
    justify-content: center;
    margin-bottom: 24px;
}

.login-icon img {
    width: 120px;
    height: 120px;
}

.login-container {
    width: 100%;
    max-width: 400px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.login-card {
    background: white;
    border-radius: 12px;
    padding: 32px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.login-header {
    text-align: center;
    margin-bottom: 32px;
}

.login-header h2 {
    font-size: 1.875rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 8px;
}

.login-header p {
    color: #64748b;
    font-size: 0.875rem;
}

.form-group {
    margin-bottom: 5px;
}

.input-wrapper {
    position: relative;
    display: flex;
    flex-direction: column;
}

.input-wrapper input {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    padding: 12px 16px 8px 16px;
    color: #1e293b;
    font-size: 16px;
    transition: all 0.2s ease;
    outline: none;
}

.input-wrapper label {
    position: absolute;
    left: 16px;
    top: 12px;
    color: #64748b;
    font-size: 16px;
    transition: all 0.2s ease;
    pointer-events: none;
    transform-origin: left top;
}

.input-wrapper input:focus,
.input-wrapper input:valid,
.input-wrapper input.has-value {
    border-color: #0074d9;
}

.input-wrapper input:focus + label,
.input-wrapper input:valid + label,
.input-wrapper input.has-value + label {
    transform: translateY(-8px) scale(0.875);
    color: #0074d9;
    font-weight: 500;
}

.password-wrapper {
    position: relative;
}

.password-wrapper input {
    padding-right: 48px;
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    color: #64748b;
    transition: color 0.2s ease;
}

.password-toggle:hover {
    color: #1e293b;
}

.eye-icon {
    display: block;
    width: 20px;
    height: 20px;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748b' stroke-width='1.5'%3e%3cpath stroke-linecap='round' stroke-linejoin='round' d='M15 12a3 3 0 11-6 0 3 3 0 016 0z'/%3e%3cpath stroke-linecap='round' stroke-linejoin='round' d='M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z'/%3e%3c/svg%3e");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.eye-icon.show-password {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748b' stroke-width='1.5'%3e%3cpath stroke-linecap='round' stroke-linejoin='round' d='M3.98 8.223A10.477 10.477 0 001.934 12C3.226 16.338 7.244 19.5 12 19.5c.993 0 1.953-.138 2.863-.395M6.228 6.228A10.45 10.45 0 0112 4.5c4.756 0 8.773 3.162 10.065 7.498a10.523 10.523 0 01-4.293 5.774M6.228 6.228L3 3m3.228 3.228l3.65 3.65m7.894 7.894L21 21m-3.228-3.228l-3.65-3.65m0 0a3 3 0 11-4.243-4.243m4.242 4.242L9.88 9.88'/%3e%3c/svg%3e");
}

.error-message {
    display: block;
    color: #ef4444;
    font-size: 0.75rem;
    font-weight: 500;
    margin-top: 4px;
    margin-left: 4px;
    opacity: 0;
    transform: translateY(-4px);
    transition: all 0.2s ease;
}

.error-message.show {
    opacity: 1;
    transform: translateY(0);
}

.form-group.error .input-wrapper input {
    border-color: #ef4444;
}

.error-notification {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 20px;
    color: #ef4444;
    text-align: center;
    font-size: 14px;
}

.login-btn {
    width: 100%;
    background: #0074d9;
    border: none;
    border-radius: 8px;
    padding: 12px 24px;
    color: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    margin-bottom: 24px;
}

.login-btn:hover {
    background: #005fa3;
}

.login-btn.loading {
    pointer-events: none;
    background: #a5a6f6;
}

.btn-text {
    transition: opacity 0.2s ease;
}

.btn-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top: 2px solid white;
    border-radius: 50%;
    opacity: 0;
    animation: spin 1s linear infinite;
    transition: opacity 0.2s ease;
}

.login-btn.loading .btn-text {
    opacity: 0;
}

.login-btn.loading .btn-loader {
    opacity: 1;
}

.signup-link {
    text-align: center;
}

.signup-link p {
    color: #64748b;
    font-size: 0.875rem;
}

.signup-link a {
    color: #0074d9;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.signup-link a:hover {
    color: #005fa3;
}

.success-message {
    display: none;
    text-align: center;
    padding: 32px 20px;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.success-message.show {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.success-icon {
    width: 48px;
    height: 48px;
    background: #22c55e;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: white;
    margin: 0 auto 16px;
    animation: successPulse 0.5s ease;
}

.success-message h3 {
    color: #1e293b;
    font-size: 1.25rem;
    margin-bottom: 8px;
}

.success-message p {
    color: #64748b;
    font-size: 0.875rem;
}

@media (max-width: 480px) {
    .login-card {
        padding: 24px;
        margin: 10px;
    }
    
    .login-header h2 {
        font-size: 1.5rem;
    }
}
