:root {
    --primary-color: #1e40af;
    --primary-hover: #1e3a8a;
    --bg-color: #f3f4f6;
    --card-bg: #ffffff;
    --text-main: #1f2937;
    --text-muted: #6b7280;
    --border-color: #e5e7eb;
    --error-color: #dc2626;
    --error-bg: #fef2f2;
    --error-border: #fca5a5;
    --success-color: #16a34a;
    --success-bg: #f0fdf4;
    --success-border: #86efac;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
    background-color: var(--bg-color);
    background-image: url('pic/bg001.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    color: var(--text-main);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 1rem;
}

.container {
    background: var(--card-bg);
    padding: 2.5rem 1.5rem;
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2), 0 10px 20px rgba(0, 0, 0, 0.1);
    border: 3px solid #1e3a8a;
    width: 100%;
    max-width: 420px;
}

h1 {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
    text-align: center;
    font-weight: 700;
}

p.subtitle {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 2rem;
    font-size: 0.95rem;
}

.form-group {
    margin-bottom: 1.25rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--text-main);
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"] {
    width: 100%;
    padding: 0.875rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.2s ease-in-out;
    background-color: #f9fafb;
    color: var(--text-main);
}

input:focus {
    outline: none;
    border-color: var(--primary-color);
    background-color: #ffffff;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.btn {
    width: 100%;
    padding: 0.875rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease-in-out;
    margin-top: 0.5rem;
}

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

.links {
    margin-top: 1.5rem;
    text-align: center;
    font-size: 0.9rem;
}

.links a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

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

.alert {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    text-align: center;
    line-height: 1.4;
}

.alert-error {
    background-color: var(--error-bg);
    color: var(--error-color);
    border: 1px solid var(--error-border);
}

.alert-success {
    background-color: var(--success-bg);
    color: var(--success-color);
    border: 1px solid var(--success-border);
}

.main-title {
    text-align: center;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
    font-weight: bold;
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    background-color: lightblue;
    padding: 0.75rem;
    border-radius: 8px;
    border: 3px solid darkblue;
}

.user-name {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary-color);
    padding: 1rem;
    background-color: yellow;
    border-radius: 8px;
}

.portal-name {
    text-align: center;
    color: darkred;
    background-color: yellow;
    margin-bottom: 1.5rem;
    font-weight: bold;
    font-size: 1.1rem;
    padding: 0.6rem;
    border-radius: 8px;
}

.portal-info {
    text-align: justify;
    border: 3px solid red;
    padding: 1rem;
    margin-bottom: 1.5rem;
    border-radius: 8px;
    font-size: 0.95rem;
    color: var(--text-main);
    line-height: 1.5;
    background-color: lightyellow;
}

/* Dashboard Actions */
.action-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.action-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 1rem 0.5rem;
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    text-decoration: none;
    color: var(--text-main);
    transition: all 0.2s ease-in-out;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
    text-align: center;
}

.action-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.1);
    transform: translateY(-2px);
}

.action-icon {
    font-size: 2rem;
    color: var(--primary-color);
    margin-right: 0;
    margin-bottom: 0.5rem;
}

.action-text {
    font-size: 0.95rem;
    font-weight: 600;
}

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--border-color);
    color: var(--text-muted);
}

.btn-outline:hover {
    background-color: var(--bg-color);
    border-color: var(--text-muted);
}

/* Table Styles */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    font-size: 0.9rem;
}

th, td {
    padding: 0.75rem 0.5rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

th {
    background-color: #f9fafb;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
}

.action-btns {
    display: flex;
    gap: 0.75rem;
}

.action-btn {
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    font-size: 1.25rem;
    transition: color 0.2s;
}

.edit-btn {
    color: var(--primary-color);
}

.delete-btn {
    color: var(--error-color);
}

.save-btn {
    color: var(--success-color);
}

.cancel-btn {
    color: var(--text-muted);
}

input.inline-edit {
    width: 100%;
    padding: 0.4rem;
    border: 1px solid var(--primary-color);
    border-radius: 4px;
    font-size: 0.9rem;
}
/* Color & Symbol Picker Styles */
.color-preview {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: inline-block;
    border: 1px solid #ccc;
    vertical-align: middle;
}

.symbol-picker-btn {
    cursor: pointer;
    border: 1px solid var(--border-color);
    padding: 0.5rem;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #fff;
    width: 100%;
    font-size: 0.85rem;
    color: var(--text-main);
    text-align: left;
}

.symbol-overlay {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 1000;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    padding: 0.75rem;
    width: 280px;
    display: none;
}

.symbol-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 0.25rem;
    max-height: 200px;
    overflow-y: auto;
    margin-top: 0.5rem;
}

.symbol-item {
    font-size: 1.25rem;
    text-align: center;
    padding: 0.25rem;
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.2s;
}

.symbol-item:hover {
    background: #f0f0f0;
    color: var(--primary-color);
}

.symbol-search {
    width: 100%;
    padding: 0.4rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 0.85rem;
}

/* Trip Detail Panel Styles */
.trip-panel {
    border-radius: 12px;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    color: black;
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
    transition: transform 0.2s;
}

.trip-panel:hover {
    transform: translateY(-1px);
}

.trip-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    gap: 0.75rem;
}

.trip-panel-type {
    font-weight: 800;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
    opacity: 0.8;
}

.trip-panel-icon {
    font-size: 1.5rem;
    line-height: 1;
}

.trip-panel-dates {
    font-size: 0.8rem;
    color: darkred;
    background-color: yellow;
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    display: inline-block;
    font-weight: bold;
    box-shadow: 1px 1px 0 rgba(0,0,0,0.1);
}

.trip-panel-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.25rem;
}

.trip-panel-title {
    font-size: 1.1rem;
    font-weight: bold;
    line-height: 1.2;
}

.trip-panel-koords {
    font-family: monospace;
    font-size: 0.85rem;
    background: rgba(0,0,0,0.05);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    color: #333;
}

.trip-panel-prices {
    background: rgba(255,255,255,0.4);
    border-radius: 8px;
    padding: 0.75rem;
    margin-top: 0.75rem;
    border: 1px solid rgba(0,0,0,0.05);
}

.price-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.35rem;
    font-size: 0.9rem;
    color: black;
}

.price-item:last-child { margin-bottom: 0; }

.trip-panel-info {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(0,0,0,0.1);
    font-size: 0.9rem;
    font-style: italic;
    white-space: pre-wrap;
    color: #444;
}


/* Edit Mode Overrides */
.trip-panel.edit-mode {
    background: #fff !important;
    color: var(--text-main);
    border: 2px solid var(--primary-color);
}

.trip-panel.edit-mode label {
    color: var(--text-muted);
    font-size: 0.7rem;
    margin-bottom: 0.2rem;
}

.trip-panel.edit-mode input,
.trip-panel.edit-mode select,
.trip-panel.edit-mode textarea {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.9rem;
}


/* Remove arrows/spinners from number inputs */
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
input[type=number] {
    -moz-appearance: textfield;
}
