:root {
	--login-primary-background: #ffffff; /* Sininen */
	--login-text-color: #5b6574; /* Valkoinen */
	--login-border-bottom: #dee0e4;
	--login-links: #adb2ba;
	--login-links-hoover: #9da3ac;
	--login-link-active: #3274d6;
	--login-link-active: #3274d6;
	--login-form-label: #ffffff;
	--login-submit-hoover: #2868c7;
	--login-remeber-me: #000;
	--login-form-a: #5b6574;
	--login-form-a-hover: #394049;
	--bacground-color: #f2f2f2;   /* #f2f2f2 */

}



.login, .register {
  width: 400px;
  background-color: var(--login-primary-background);
  box-shadow: 0 0 9px 0 rgba(0, 0, 0, 0.3);
  margin: 100px auto;
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 24px 24px 18px;
  border-bottom: 1px solid var(--login-border-bottom);
}

.login-brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  background: #2f3947;
  color: #fff;
  font-size: 21px;
}

.login-brand h1 {
  margin: 0;
  padding: 0;
  border: 0;
  text-align: left;
}

.login-brand p {
  margin: 5px 0 0;
  color: #667085;
  font-size: 14px;
  line-height: 1.35;
}

.login-notice {
  margin: 0;
  padding: 16px 20px 20px;
  color: #667085;
  font-size: 13px;
  text-align: center;
}

.login-notice i {
  margin-right: 5px;
}

@media (max-width: 480px) {
  .login, .register {
    width: calc(100% - 32px);
    margin: 32px auto;
  }

  .login-brand {
    padding: 20px 18px 16px;
  }
}

.login h1, .register h1 {
  text-align: center;
  color: var(--login-text-color);
  font-size: 24px;
  padding: 20px 0 20px 0;
  border-bottom: var(--login-border-bottom);
}

.login .links, .register .links {
  display: flex;
  padding: 0 15px;
}

.login .links a, .register .links a {
  color: var(--login-links);
  text-decoration: none;
  display: inline-flex;
  padding: 0 10px 10px 10px;
  font-weight: bold;
}

.login .links a:hover, .register .links a:hover {
  color: var(--login-links-hoover);
}

.login .links a.active, .register .links a.active {
  border-bottom: 3px solid var(--login-link-active);
  color: var(--login-link-active);
}

.login form, .register form {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  padding-top: 20px;
}

.login form label, .register form label {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 12%;
  height: 50px;
  background-color: var(--login-link-active);
  color: var(--login-form-label);
  vertical-align: middle; /* Lisätty pystysuora tasaus */
}

.login form input[type="password"], .login form input[type="text"], .login form input[type="email"], .register form input[type="password"], .register form input[type="text"], .register form input[type="email"] {
  width: 70%;
  height: 50px;
  border: 1px solid var(--login-border-bottom);
  margin-bottom: 20px;
  padding: 0 15px;
  vertical-align: middle; /* Lisätty pystysuora tasaus */
}

.login form input[type="submit"], .register form input[type="submit"] {
  width: 100%;
  padding: 15px;
  margin-top: 20px;
  background-color: var(--login-link-active);
  border: 0;
  cursor: pointer;
  font-weight: bold;
  color: var(--login-form-label);
  transition: background-color 0.2s;
  border-radius: 0;
  -webkit-border-radius: 0;
  appearance: none;
  -moz-appearance: none;
  -webkit-appearance: none;
}

.login form input[type="submit"]:hover, .register form input[type="submit"]:hover {
  background-color: var(--login-submit-hoover);
  transition: background-color 0.2s;
}

.login form #rememberme, .register form #rememberme {
  width: 100%;
  height: auto;
  padding: 5px 20px;
  background-color: transparent;
  color: var(--login-remeber-me);
  justify-content: flex-start;
}

.login form #rememberme input, .register form #rememberme input {
  transform: scale(1.3);
  margin-right: 7px;
}

.login form .msg, .register form .msg {
  padding: 0 20px;
  width: 100%;
}

.login form > a, .register form > a {
  text-decoration: none;
  color: var(--login-form-a);
  width: 100%;
  padding: 5px 20px;
}

.login form > a:hover, .register form > a:hover {
  color: var(--login-form-a-hover);
}

/* ajat.php */
.header-with-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 1.5em;
    margin: 20px 0;
    padding: 0;
    position: relative;
}

.header-text {
    flex: 1;
    text-align: left;
    font-weight: bold;
    color: #333;
}

.month-nav {
    display: flex;
    gap: 10px; /* Välilyönti painikkeiden välillä */
    justify-content: center;
    align-items: center;
    flex: 1;
}

.month-nav a {
    text-decoration: none;
    font-weight: bold;
    color: #007bff;
    font-size: 1.2em;
    padding: 5px 10px;
    transition: color 0.3s ease;
}

.month-nav a:hover {
    color: #0056b3;
    text-decoration: underline;
}

        /* CSS for the popup */
        .popup {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(0, 0, 0, 0.7);
            z-index: 9999;
        }

        .popup-content {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            background-color: #fff;
            padding: 20px;
            border-radius: 5px;
            box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.5);
            max-width: 80%;
        }

        .close-popup {
            position: absolute;
            top: 10px;
            right: 10px;
            cursor: pointer;
        }

        /* CSS for the table */
        table {
            width: 100%;
            border-collapse: collapse;
        }

        table, th, td {
            border: 1px solid #ccc;
        }

        th, td {
            padding: 10px;
            text-align: left;
        }

        th {
            background-color: var(--bacground-color);
        }

        tbody tr:nth-child(odd) {
            background-color: var(--bacground-color);
        }

        .show-comment {
            cursor: pointer;
        }

        .edit-comment {
            cursor: pointer;
        }

       
        /* Style the form elements in the edit popup */
.popup-content .form-group {
    margin-bottom: 15px;
}

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

.popup-content input[type="text"],
.popup-content input[type="date"],
.popup-content input[type="time"],
.popup-content textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.popup-content input[type="submit"] {
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    padding: 10px 20px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 16px;
    margin-top: 10px;
}

.popup-content input[type="submit"]:hover {
    background-color: #45a049;
}

.centered-notification {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #4e5c70; /* Adjust the background color to match the rest of your page */
    color: #FFFFFF; /* Text color */
    padding: 20px;
    border-radius: 5px;
    z-index: 9999;
    display: none;
    box-shadow: none; /* Remove box shadow */
    text-align: center;
    font-size: 16px;
}

    /* Red button style */
    .delete-button {
        background-color: #ff5733; /* Red color */
        color: white;
        border: none;
        border-radius: 4px;
        cursor: pointer;
        padding: 10px 20px;
        text-align: center;
        text-decoration: none;
        display: inline-block;
        font-size: 16px;
        margin-top: 10px;
    }

    .delete-button:hover {
        background-color: #ff4520; /* Darker red on hover */
    }... /* lisaa_aika.php */

        /* Include the CSS for the table and form elements here */
        body {
            font-family: Arial, sans-serif;
            background-color: var(--bacground-color);
        }
        h1 {
            font-size: 24px;
            color: #333;
        }
        label {
            font-weight: bold;
            color: #333;
        }
        table {
            width: 100%;
            border-collapse: collapse;
            margin: 20px 0;
        }
        table, th, td {
            border: 1px solid #ccc;
        }
        th, td {
            padding: 10px;
            text-align: left;
        }
        th {
            background-color: #333;
            color: #fff;
        }
        tbody tr:nth-child(odd) {
            background-color: var(--bacground-color);
        }
        select, input[type="text"], input[type="time"], textarea {
            width: 100%;
            padding: 5px;
            border: 1px solid #ccc;
            border-radius: 5px;
        }
        input[type="submit"] {
            background-color: #4CAF50;
            color: white;
            border: none;
            border-radius: 5px;
            padding: 10px 20px;
            font-size: 16px;
            cursor: pointer;
        }
        input[type="submit"]:hover {
            background-color: #45a049;
        }
        /* Add styles for the popup */
        .popup {
            font-weight: bold;
            font-size: 18px;
            position: fixed;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            background-color: #fff;
            border: 1px solid #ccc;
            box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.2);
            padding: 20px;
            border-radius: 5px;
            z-index: 1000;
        }



        /* matkat.php */



        /* CSS for the popup */
        .popup {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(0, 0, 0, 0.7);
            z-index: 9999;
        }

        .popup-content {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            background-color: #fff;
            padding: 20px;
            border-radius: 5px;
            box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.5);
            max-width: 80%;
        }

        .close-popup {
            position: absolute;
            top: 10px;
            right: 10px;
            cursor: pointer;
        }

        /* CSS for the table */
        table {
            width: 100%;
            border-collapse: collapse;
        }

        table, th, td {
            border: 1px solid #ccc;
        }

        th, td {
            padding: 10px;
            text-align: left;
        }

        th {
            background-color: var(--bacground-color);
        }

        tbody tr:nth-child(odd) {
            background-color: var(--bacground-color);
        }

        .show-comment {
            cursor: pointer;
        }

        .edit-trip {
            cursor: pointer;
        }

       
        /* Style the form elements in the edit popup */
.popup-content .form-group {
    margin-bottom: 15px;
}

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

.popup-content input[type="text"],
.popup-content input[type="date"],
.popup-content input[type="time"],
.popup-content textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.popup-content input[type="submit"] {
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    padding: 10px 20px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 16px;
    margin-top: 10px;
}

.popup-content input[type="submit"]:hover {
    background-color: #45a049;
}

/* Styles for success message or error message */
#message {
    font-weight: bold;
    text-align: center;
    margin: 10px 0;
    color: #4CAF50;
}

#error-message {
    color: red;
}

.centered-notification {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #4e5c70; /* Adjust the background color to match the rest of your page */
    color: #FFFFFF; /* Text color */
    padding: 20px;
    border-radius: 5px;
    z-index: 9999;
    display: none;
    box-shadow: none; /* Remove box shadow */
    text-align: center;
    font-size: 16px;
}

    /* Red button style */
    .delete-button {
        background-color: #ff5733; /* Red color */
        color: white;
        border: none;
        border-radius: 4px;
        cursor: pointer;
        padding: 10px 20px;
        text-align: center;
        text-decoration: none;
        display: inline-block;
        font-size: 16px;
        margin-top: 10px;
    }

    .delete-button:hover {
        background-color: #ff4520; /* Darker red on hover */
    }

	/* lisaa_matkat.php	*/

        /* Include the CSS for the table and form elements here */
        body {
            font-family: Arial, sans-serif;
            background-color: var(--bacground-color);
        }
        h1 {
            font-size: 24px;
            color: #333;
        }
        label {
            font-weight: bold;
            color: #333;
        }
        table {
            width: 100%;
            border-collapse: collapse;
            margin: 20px 0;
        }
        table, th, td {
            border: 1px solid #ccc;
        }
        th, td {
            padding: 10px;
            text-align: left;
        }
        th {
            background-color: #333;
            color: #fff;
        }
        tbody tr:nth-child(odd) {
            background-color: var(--bacground-color);
        }
        select, input[type="text"], input[type="time"], textarea {
            width: 100%;
            padding: 5px;
            border: 1px solid #ccc;
            border-radius: 5px;
        }
        input[type="submit"] {
            background-color: #4CAF50;
            color: white;
            border: none;
            border-radius: 5px;
            padding: 10px 20px;
            font-size: 16px;
            cursor: pointer;
        }
        input[type="submit"]:hover {
            background-color: #45a049;
        }
        /* Add styles for the popup */
        .popup {
            font-weight: bold;
            font-size: 18px;
            position: fixed;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            background-color: #fff;
            border: 1px solid #ccc;
            box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.2);
            padding: 20px;
            border-radius: 5px;
            z-index: 1000;
        }

/* nayta_liite.php */

#edit-overlay {
            display: none;
	    position: fixed;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
           // width: 100%;
           // height: 100%;
            background: rgba(0, 0, 0, 0.7);
            justify-content: center;
            align-items: center;
            z-index: 1000;

}

 .edit-form-container {
    background-color: white;
    padding: 20px;
    width: 400px; /* Voit säätää tätä kokoa tarpeen mukaan */
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.edit-form-container input,
.edit-form-container textarea {
    width: 100%;
    padding: 8px;
    margin: 10px 0;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.edit-form-container button {
    padding: 10px 15px;
    margin: 5px;
    border: none;
    background-color: #007bff;
    color: white;
    cursor: pointer;
}

.edit-form-container button[type="button"] {
    background-color: #dc3545;
}


        .edit-btn {
            background-color: #007bff;
            color: white;
            border: none;
            border-radius: 5px;
            padding: 10px 20px;
            font-size: 16px;
            cursor: pointer;
        }

        .edit-btn:hover {
            background-color: #0056b3;
        }


        body {
            font-family: Arial, sans-serif;
            background-color: var(--bacground-color);
        }
        h1 {
            font-size: 24px;
            color: #333;
        }
        label {
            font-weight: bold;
            color: #333;
        }
        table {
            width: 100%;
            border-collapse: collapse;
            margin: 20px 0;
        }
        table, th, td {
            border: 1px solid #ccc;
        }
        th, td {
            padding: 10px;
            text-align: left;
        }
        th {
            background-color: #333;
            color: #fff;
        }
        tbody tr:nth-child(odd) {
            background-color: var(--bacground-color);
        }
        select, input[type="text"], input[type="date"], input[type="number"], textarea {
            width: 100%;
            padding: 5px;
            border: 1px solid #ccc;
            border-radius: 5px;
        }
        input[type="submit"] {
            background-color: #4CAF50;
            color: white;
            border: none;
            border-radius: 5px;
            padding: 10px 20px;
            font-size: 16px;
            cursor: pointer;
        }
        input[type="submit"]:hover {
            background-color: #45a049;
        }

        #overlay {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.7);
            justify-content: center;
            align-items: center;
            z-index: 1000;
        }

        .preview-container {
            position: relative;
            width: 90vw;
            height: 90vh;
            display: flex;
            justify-content: center;
            align-items: center;
            overflow: hidden;
        }

        .preview-container.dragging {
            cursor: grabbing;
        }

        #preview-image {
            max-width: 100%;
            max-height: 100%;
            object-fit: contain;
            transform-origin: center center;
            transition: transform 0.2s ease;
            position: relative;
            will-change: transform;
            display: none;
        }

        #preview-pdf {
            width: 100%;
            height: 100%;
            border: none;
            display: none;
        }

        .controls {
            position: fixed;
            bottom: 20px;
            left: 50%;
            transform: translateX(-50%);
            background: rgba(0, 0, 0, 0.5);
            padding: 10px;
            border-radius: 5px;
            display: none;
            gap: 10px;
            z-index: 1000;
        }

        .preview-controls-image,
        .preview-controls-pdf {
            display: none;
        }

        .control-btn {
            background: white;
            border: none;
            padding: 5px 10px;
            border-radius: 3px;
            cursor: pointer;
        }

        /* Button Styles */
        .lataa-btn {
            background-color: #007bff;
            color: white;
            border: none;
            border-radius: 5px;
            padding: 10px 20px;
            font-size: 16px;
            cursor: pointer;
        }

        .lataa-btn:hover {
            background-color: #0056b3;
        }

        .preview-btn {
            background-color: #28a745;
            color: white;
            border: none;
            border-radius: 5px;
            padding: 10px 20px;
            font-size: 16px;
            cursor: pointer;
        }

        .preview-btn:hover {
            background-color: #218838;
        }

        .poista-btn {
            background-color: #dc3545;
            color: white;
            border: none;
            border-radius: 5px;
            padding: 10px 20px;
            font-size: 16px;
            cursor: pointer;
        }

        .poista-btn:hover {
            background-color: #c82333;
        }

        header, aside {
            z-index: 1;
        }

/* Latausindikaattori (spinner) keskellä */
#loading-spinner {
    display: none;
    position: fixed;  /* Change from 'absolute' to 'fixed' */
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 24px;
    background-color: rgba(0, 0, 0, 0.7); /* Tumma tausta latausindikaattorille */
    padding: 10px 20px;
    border-radius: 5px;
    z-index: 1001;  /* Ensure it's above other elements */
}

	/* lisaa_liite */

        /* Include the CSS for the table and form elements here */
        body {
            font-family: Arial, sans-serif;
            background-color: var(--bacground-color);
        }
        h1 {
            font-size: 24px;
            color: #333;
        }
        label {
            font-weight: bold;
            color: #333;
        }
        table {
            width: 100%;
            border-collapse: collapse;
            margin: 20px 0;
        }
        table, th, td {
            border: 1px solid #ccc;
        }
        th, td {
            padding: 10px;
            text-align: left;
        }
        th {
            background-color: #333;
            color: #fff;
        }
        tbody tr:nth-child(odd) {
            background-color: var(--bacground-color);
        }
        select, input[type="text"], input[type="date"], input[type="number"], textarea {
            width: 100%;
            padding: 5px;
            border: 1px solid #ccc;
            border-radius: 5px;
        }
        input[type="submit"] {
            background-color: #4CAF50;
            color: white;
            border: none;
            border-radius: 5px;
            padding: 10px 20px;
            font-size: 16px;
            cursor: pointer;
        }
        input[type="submit"]:hover {
            background-color: #45a049;
        }
        /* Popup for success or error message */
        .popup {
            font-weight: bold;
            font-size: 18px;
            position: fixed;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            background-color: #fff;
            border: 1px solid #ccc;
            box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.2);
            padding: 20px;
            border-radius: 5px;
            z-index: 1000;
        }

        /* Popup for success or error message */
        .popup2 {
            font-weight: bold;
            font-size: 18px;
            position: fixed;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            background-color: #fff;
            border: 1px solid #ccc;
            box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.2);
            padding: 20px;
            border-radius: 5px;
            z-index: 1000;
        }

        .popup_error {
            background-color: #f8d7da;
            color: #721c24;
            border-color: #f5c6cb;
        }
