/* ===================== */
/* BASE */
/* ===================== */

body {
    font-family: Arial;
    background: #F9F7F4;
    margin: 0;
    padding: 20px;
}

h1 {
    margin-bottom: 20px;
}

a {
    color: #2c7be5;
    text-decoration: none;
}

/* ===================== */
/* CARD / CONTENT */
/* ===================== */

.card {
    background: #FFFCFC;
    padding: 2em;
	margin-left: 17%;
	margin-right: 17%;
    margin-bottom: 10px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
	transition: all 0.5s ease;
}
.card:hover {
    box-shadow: 0 2px 5px rgba(0,0,0,0.25);

}
.card.danger {
    border-left: 4px solid #d9534f;
}

.premium {
    background: #BBE6B6;
    transition: all 0.5s ease;
}

.premium:hover {
    box-shadow:
        0 0 0 1px #2CA44C,
        0 6px 18px #2CA44C,
        0 0 30px #2CA44C;
}

.card-row {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.card-content {
    flex: 1;
	width: 25%;
}
.card-content-second {
    flex: 1;
}
.card-content-third {
    flex: 1;
	height: 100%;
}

.title {
    font-weight: bold;
    font-size: 18px;
    margin-bottom: 4px;
}

.meta {
    font-size: 0.8em;
    color: #666;
    margin-bottom: 6px;
}

.dates {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 6px;
}

/* ===================== */
/* TAGS / LINKS */
/* ===================== */

.tags {
    margin-top: 8px;
}

.tag {
    display: inline-block;
    background: #e0e0e0;
    padding: 3px 8px;
    margin-right: 5px;
    border-radius: 5px;
    font-size: 12px;
}

.links {
    margin-top: 12px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.links a {
    font-size: 14px;
    color: #2c7be5;
    text-decoration: none;
    font-weight: 500;
}

.links a:hover {
    text-decoration: underline;
}

.link-disabled {
    font-size: 14px;
    color: #aaa;
}

/* ===================== */
/* JUDGES */
/* ===================== */

.judges {
	font-size: 0.8em;
    margin-top: 8px;
}

.judge-row {
    font-size: 13px;
    margin-bottom: 4px;
}

/* ===================== */
/* STATUS / TYPE */
/* ===================== */

.status-badge {
    display: inline-block;
    padding: 3px 8px;
    font-size: 12px;
    border-radius: 6px;
    font-weight: 600;
    margin-top: 6px;
    margin-bottom: 6px;
}

.status-badge.finished {
    background: #e6f4ea;
    color: #1e7e34;
}

.status-badge.ongoing {
    background: #fff4e5;
    color: #b26a00;
}

.status-badge.upcoming {
    background: #e7f1ff;
    color: #1d4ed8;
}

.status-badge.draft {
    background: #e5e7eb;
    color: #919294;
}
.status-badge.replaced {
    background: #E9E579;
    color: #A6A45B;
}

.type-badge {
    display: inline-block;
    padding: 3px 8px;
    font-size: 12px;
    border-radius: 6px;
    font-weight: 600;
    margin-top: 6px;
    margin-bottom: 6px;
}

.type-badge.static {
    background: #e6f4ea;
    color: #1e7e34;
}

.type-badge.dynamic {
    background: #fff4e5;
    color: #b26a00;
}

.type-badge.mixed {
    background: #e7f1ff;
    color: #1d4ed8;
}

/* ===================== */
/* BUTTONS */
/* ===================== */

.btn-primary {
    background: #737DF5;
    color: white;
    padding: 0 16px;
    margin-bottom: 8px;
    border-radius: 6px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    font-weight: 500;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    transition: all 0.5s ease;
}

.btn-primary:hover {
    background: #6973E3;
}

.btn-secondary {
    background: #e5e7eb;
    color: #333;
    padding: 0 16px;
    margin-bottom: 8px;
    border-radius: 6px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    font-weight: 500;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    transition: all 0.5s ease;
}

.btn-secondary:hover {
    background: #d1d5db;
}
.btn-back {
    background: #BBE6B6;
    color: #111;
    padding: 0 16px;
    margin-bottom: 8px;
    border-radius: 6px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    font-weight: 500;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.5s ease;
}

.btn-back:hover {
    background: #2CA44C;
}

.btn-danger {
    background: #ef4444;
    color: white;
    padding: 0 16px;
    margin-bottom: 8px;
    border-radius: 6px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    font-weight: 500;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.5s ease;
}

.btn-danger:hover {
    background: #B00F0F;
}

.btn-icon {
    width: 3em;
    height: 3em;
    border-radius: 50%;
    background: #BBE6B6;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #333;
    text-decoration: none;
	margin-right: 10px;
    transition: all 0.5s ease;
}

.btn-icon:hover {
    background: #2CA44C;
}

.scroll-top-btn {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 1200;
    width: 46px;
    height: 46px;
    border: none;
    border-radius: 50%;
    background: #737DF5;
    color: #fff;
    cursor: pointer;
    font-size: 24px;
    font-weight: 700;
    line-height: 1;
    box-shadow: 0 8px 20px rgba(0,0,0,0.22);
    opacity: 0;
    pointer-events: none;
    transform: translateY(12px);
    transition: all 0.25s ease;
}

.scroll-top-btn.visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.scroll-top-btn:hover {
    background: #6973E3;
    box-shadow: 0 10px 24px rgba(0,0,0,0.3);
}

/* ===================== */
/* TOOLBAR / TOPBAR */
/* ===================== */

.toolbar {
    display: flex;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
}

.topbar {
    margin: -20px -20px 20px -20px;
    position: sticky;
    top: 0;
    z-index: 1000;

    display: flex;
    justify-content: space-between;
    align-items: center;

    border-radius: 8px;
    padding: 5px 20px;
    margin-bottom: 20px;

    background: #F7F7F8;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
	gap: 1em;
}

.topbar-left {
    flex: 0 0 50%;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 10px;
}

.topbar-right {
    flex: 0 0 50%;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
}

.mobile-label {
    display: none;
}

/* ===================== */
/* USER */
/* ===================== */

.user-name {
    font-weight: 700;
}

.user-box {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    color: inherit;
    width: 48px;
    height: 48px;
    padding: 0;
    border-radius: 50%;
    /* box-shadow: 0 2px 5px rgba(0,0,0,0.45); */
    flex: 0 0 48px;
    box-sizing: border-box;
}

.user-box:hover {
    background: #f1f5f9;
}

.user-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    line-height: 0;
}

.user-role {
    background: #eee;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
}
.user-dropdown {
    position: relative;
}

/* TRIGGER */
.user-trigger {
    border: none;
    background: none;
    cursor: pointer;
}

/* MENU */
.user-menu {
    position: absolute;
    top: 120%;
    right: 0;
    min-width: 8em;

    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;

    box-shadow: 0 10px 25px rgba(0,0,0,0.08);

    display: none;
    flex-direction: column;
    z-index: 999;
}

.user-dropdown:focus-within .user-menu {
    display: flex;
}

.dropdown-item {
    padding: 10px 14px;
    text-align: left;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    text-decoration: none;
    color: #333;
    width: 100%;
	transition: all 0.5s ease;
}

.dropdown-item:hover {
    background: #f5f5f5;
}

.dropdown-item.danger {
    color: #dc2626;
}
/* ===================== */
/* FILTERS */
/* ===================== */

.filters {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.filters input,
.filters select,
.filters button,
.filters a {
    height: 38px;
    padding: 0 10px;
    border-radius: 6px;
    border: 1px solid #ddd;
    font-size: 14px;
    box-sizing: border-box;
}

.filters input[type="text"] {
    min-width: 200px;
}

.filters input[type="number"] {
    width: 200px;
}

.filters input[type="checkbox"] {
    width: auto;
    height: auto;
    padding: 0;
    margin: 0;
    border: 0;
}

.filters label {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
    white-space: nowrap;
}

.filters select {
    background: white;
    cursor: pointer;
}

.filters input:focus,
.filters select:focus {
    outline: none;
    border-color: #2c7be5;
    box-shadow: 0 0 0 2px rgba(44,123,229,0.2);
}

.filters-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ===================== */
/* TABLE */
/* ===================== */

.table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.table thead {
    background: #f1f5f9;
}

.table th {
    text-align: left;
    font-size: 13px;
    font-weight: 600;
    color: #555;
    padding: 12px 14px;
}

.table td {
    padding: 14px;
    border-top: 1px solid #eee;
    vertical-align: middle;
    font-size: 14px;
}

.table tbody tr:hover {
    background: #fafafa;
}

.table tbody tr.premium:hover {
    background: #BBE6B6;
}

.table .name {
    font-weight: 600;
}

.table .actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.competitions-table {
    table-layout: fixed;
}

.competitions-table th,
.competitions-table td {
    overflow-wrap: anywhere;
}

.club-competitions-table th:nth-child(1),
.club-competitions-table td:nth-child(1) {
    width: 28%;
}

.club-competitions-table th:nth-child(2),
.club-competitions-table td:nth-child(2) {
    width: 18%;
}

.club-competitions-table th:nth-child(3),
.club-competitions-table td:nth-child(3) {
    width: 12%;
}

.club-competitions-table th:nth-child(4),
.club-competitions-table td:nth-child(4) {
    width: 18%;
}

.club-competitions-table th:nth-child(5),
.club-competitions-table td:nth-child(5) {
    width: 24%;
}

.admin-competitions-table th:nth-child(1),
.admin-competitions-table td:nth-child(1) {
    width: 16%;
}

.admin-competitions-table th:nth-child(2),
.admin-competitions-table td:nth-child(2) {
    width: 19%;
}

.admin-competitions-table th:nth-child(3),
.admin-competitions-table td:nth-child(3) {
    width: 15%;
}

.admin-competitions-table th:nth-child(4),
.admin-competitions-table td:nth-child(4) {
    width: 13%;
}

.admin-competitions-table th:nth-child(5),
.admin-competitions-table td:nth-child(5) {
    width: 13%;
}

.admin-competitions-table th:nth-child(6),
.admin-competitions-table td:nth-child(6) {
    width: 24%;
}

.competitions-table td:last-child,
.competitions-table th:last-child {
    text-align: left;
}

.competitions-table td:last-child > .actions,
.competitions-table td:last-child > .btn-primary,
.competitions-table td:last-child > .btn-secondary,
.competitions-table td:last-child > .btn-danger {
    justify-content: flex-start;
}

.code-copy {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.code-value {
    font-weight: 600;
    letter-spacing: 0.03em;
}

.btn-copy-code {
    height: 32px;
    padding: 0 12px;
    margin-bottom: 0;
    font-size: 13px;
}

.table .action-edit {
    color: #2c7be5;
}

.table .action-delete {
    color: #dc2626;
}

.table small {
    color: #777;
    font-size: 12px;
}

/* ===================== */
/* Tile */
/* ===================== */

.tile-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100%, 1fr));
    gap: 16px;
}

.tile-card {
    display: block;
    background: #F8FAFC;
    padding: 20px;
	margin: 6px;
    border-radius: 10px;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 2px 5px rgba(0,0,0,0.15);
    transition: all 0.3s ease;
}
.tile-card.red:hover {
    transform: translateY(-5px);
	background: #D20019;
	color: white;
    box-shadow: 0 6px 14px rgba(0,0,0,0.45);
}
.tile-card.green:hover {
    transform: translateY(-5px);
	background: #2CA44C;
	color: white;
    box-shadow: 0 6px 14px rgba(0,0,0,0.45);
}

.tile-card-title {
    font-size: 0.8em;
    font-weight: 600;
    margin-bottom: 6px;
}

.tile-card-desc {
    font-size: 13px;
    color: #666;
}

/* ===================== */
/* ADMIN */
/* ===================== */

.admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

.admin-technical-counter {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
    margin: -6px 0 20px;
    padding: 8px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #f8fafc;
    color: #475569;
    font-size: 14px;
}

.admin-card {
    display: block;
    background: #F7F7F8;
    padding: 20px;
    border-radius: 10px;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.admin-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 14px rgba(0,0,0,0.08);
}

.admin-card-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 6px;
}

.admin-card-desc {
    font-size: 13px;
    color: #666;
}

.badge {
    display: inline-block;
    margin-left: 6px;
    padding: 4px 4px;
    font-size: 11px;
    border-radius: 999px;
    background: #dc2626;
    color: white;
}
.badge.blue {
    background: #2c7be5;
}

/* ===================== */
/* FORM */
/* ===================== */

.form-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
}

/* DUPLIKAT */
.checkbox-group {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.form-group {
    margin-bottom: 12px;
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-size: 0.9em;
    margin-bottom: 4px;
    color: #666;
}

.form-group input {
    margin-bottom: 4px;
    border: 1px solid #ccc;
    border-radius: 6px;
}

.form-input {
    width: 100%;
    padding: 8px 12px;
    margin: 4px 0;
    border-radius: 6px;
    border: 1px solid #ddd;
    font-size: 14px;
    box-sizing: border-box;
}

.form-input:focus {
    outline: none;
    border-color: #2c7be5;
    box-shadow: 0 0 0 2px rgba(44,123,229,0.2);
}

.form-file {
    display: block;
	padding: 2em;
    border-radius: 10px;
	margin: 6px;
    border: 1px solid #ddd;
    background: #F5F5F5;
}
.form-file.red {
    background: #F0D6D6;
}
.form-file.green {
    background: #DDF6DC;
}

.form-card {
    background: #F7F7F8;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    max-width: 900px;
    margin: 0 auto;
}

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

.date-row {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}

.premium-box {
    margin: 18px 0;
    padding: 16px 18px;
    border: 2px solid #2CA44C;
    border-radius: 10px;
    background: #e6f6e3;
    box-shadow: 0 8px 20px rgba(44, 164, 76, 0.12);
}

.premium-box label {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin: 0;
    color: #123d1d;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
}

.premium-box input[type="checkbox"] {
    width: 24px;
    height: 24px;
    margin: 0;
    accent-color: #159447;
    cursor: pointer;
}

.alert-success {
    background: #e6f4ea;
    padding: 10px;
    border-radius: 6px;
    margin-bottom: 12px;
}

.alert-danger {
    background: #fde8e8;
    color: #991b1b;
    padding: 10px;
    border-radius: 6px;
    margin-bottom: 12px;
}

.alert-danger ul {
    margin: 8px 0 0 18px;
    padding: 0;
}

/* ===================== */
/* DATE / CALENDAR */
/* ===================== */

.date-box {
    min-width: 5em;
    text-align: center;
    background: #f8fafc;
    border-radius: 10px;
    padding: 10px 6px;
    border: 1px solid #e5e7eb;
}

.day {
    font-size: 1.5em;
    font-weight: 700;
    color: #111;
}

.month {
    font-size: 0.7em;
    color: #666;
    text-transform: lowercase;
}

.year {
    font-size: 0.6em;
    color: #999;
}

.month-header {
    position: sticky;
    top: 58px;
    background: #F7F6F9;
    z-index: 20;
    padding: 10px;
	margin: 20px 10%;
    border-bottom: 1px solid grey;
    border-radius: 10px;
}

@media (min-width: 769px) {
    .public-calendar-filters {
        position: sticky;
        top: 58px;
        z-index: 80;
        background: #F7F7F8;
        padding: 10px 0;
        margin: 0 0 14px;
        /* box-shadow: 0 8px 18px rgba(247, 247, 248, 0.95); */
    }

    .public-calendar-month-header {
        top: 124px;
        z-index: 70;
    }
}

/* ===================== */
/* OTHER */
/* ===================== */

input[type="checkbox"] {
    width: auto !important;
    height: auto !important;
    transform: scale(1);
}

.mobile-list {
    display: none;
}

.auth-wrapper {
    max-width: 600px;
    margin: 60px auto;
    text-align: center;
}

.left-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 90px;
    margin-right: 12px;
}

.club-logo {
    width: 90px;
    height: 90px;
    margin-top: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.club-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: all 0.3s ease;
    border-radius: 50%;
}

.club-logo img:hover {
	transform: translateY(-5px);
    box-shadow: 0 5px 8px rgba(0,0,0,0.25);
}

.admin-club-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.admin-club-logo {
    width: 54px;
    height: 54px;
    flex: 0 0 54px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.admin-club-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* ===================== */
/* FOOTER */
/* ===================== */

.footer {
    margin-top: 20px;
    padding: 20px;
    border-top: 1px solid #e5e7eb;
    display: flex;
    justify-content: center;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-align: center;
}

.footer-logo img {
    height: 60px;
    opacity: 0.8;
    border-radius: 6px;
}

.footer-text {
    font-size: 13px;
    color: #6b7280;
}

.footer a {
    color: #3b82f6;
    text-decoration: none;
    font-weight: 500;
}

.footer a:hover {
    text-decoration: underline;
}
.links-competitions {
	display: none !important;
}
/* ===================== */
/* MOBILE */
/* ===================== */

@media (max-width: 768px) {
	.topbar {
		align-items: center;
		gap: 8px;
		padding: 8px 10px;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
	}

	.topbar-left,
	.topbar-right {
		flex: 0 0 auto;
		width: auto;
		min-width: 0;
		gap: 8px;
	}

	.topbar-left {
		justify-content: flex-start;
	}

	.topbar-right {
		justify-content: flex-end;
		margin-left: auto;
	}

	.topbar .btn-primary,
	.topbar .btn-secondary,
	.topbar .btn-back {
		width: auto;
		height: 42px;
		padding: 0 12px;
		font-size: 16px;
		margin-bottom: 0;
	}

	.desktop-label {
		display: none;
	}

	.mobile-label {
		display: inline;
	}

	.user-box {
		width: 42px;
		height: 42px;
		flex-basis: 42px;
	}

	.links-competitions {
		display: flex !important;
		flex: 1;
	}
	.links-competitions {
	    margin-top: 12px;
	    display: flex;
	    gap: 12px;
	    flex-wrap: wrap;
	}
	.links-competitions a {
	    font-size: 14px;
	    color: #2c7be5;
	    text-decoration: none;
	    font-weight: 500;
	}

	.links-competitions a:hover {
	    text-decoration: underline;
	}
    .filters-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .filters-row input[type="number"] {
        width: 100%;
    }
    .table {
        display: none !important;
    }
	.card-content-second {
		display: none !important;
	}
	.card-content-third {
		display: none !important;
	}

    .mobile-list {
        display: block;
    }

    .toolbar {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .filters {
        flex-direction: column;
        align-items: stretch;
    }

    .filters input,
    .filters select,
    .filters button,
    .filters a {
        width: 100%;
    }
	.card {
		margin-left: 0;
		margin-right: 0;
	}
    .card-title {
        font-weight: 600;
        font-size: 16px;
        margin-bottom: 6px;
    }

    .card-meta {
        font-size: 13px;
        color: #666;
        margin-bottom: 8px;
    }

    .card-dates {
        font-size: 13px;
        margin-bottom: 8px;
    }

    .card-actions {
        margin-top: 10px;
    }

    .btn-primary,
	.btn-back,
    .btn-secondary,
    .btn-danger {
        width: 100%;
        padding: 0;
    }

    .scroll-top-btn {
        right: 16px;
        bottom: 16px;
        width: 42px;
        height: 42px;
        font-size: 22px;
    }
}
